From owner-freebsd-bugs Fri Oct 4 09:34:18 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA27511 for bugs-outgoing; Fri, 4 Oct 1996 09:34:18 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA27506 for ; Fri, 4 Oct 1996 09:34:11 -0700 (PDT) Received: from noc.msc.edu (noc.msc.edu [137.66.12.254]) by who.cdrom.com (8.7.5/8.6.11) with SMTP id JAA29972 for ; Fri, 4 Oct 1996 09:33:40 -0700 (PDT) Received: from uh.msc.edu by noc.msc.edu (5.65/MSC/v3.0.1(920324)) id AA04496; Fri, 4 Oct 96 11:31:36 -0500 From: jpt@msc.edu (Joseph Thomas) Received: (jpt@localhost) by uh.msc.edu (8.7.1/8.6.6) id LAA10414 for freebsd-bugs@freefall.freebsd.org; Fri, 4 Oct 1996 11:31:35 -0500 (CDT) Message-Id: <199610041631.LAA10414@uh.msc.edu> Subject: Missed sys/kern/kern_conf.c on LKM support To: freebsd-bugs@freefall.freebsd.org Date: Fri, 4 Oct 1996 11:31:34 -0500 (CDT) X-Mailer: ELM [version 2.4 PL25] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk In my previous mail about missing LM_DT_CHAR support for loadable modules, I missed fixing sys/kern/kern_conf.c. Note that this could just as likely bitten you for block devices. (It's really only going to pop up when you use auto mode on load and then try to unload a device module.) When unloading (replacing) entry, the previous (new) entry might have been an empty slot resulting in 'newentry' being NULL. This checks for that and won't try setting d_maj if so. nevyn# diff -c kern_conf.c KERN_CONF.C *** kern_conf.c Fri Oct 4 11:24:40 1996 --- KERN_CONF.C Fri Oct 4 11:24:58 1996 *************** *** 146,154 **** if (oldentry) { \ *oldentry = TTYPE[i]; \ } \ ! /* may have been an empty slot */ \ ! if ( newentry ) \ ! newentry->d_maj = i; \ /* replace with new */ \ TTYPE[i] = newentry; \ \ --- 146,152 ---- if (oldentry) { \ *oldentry = TTYPE[i]; \ } \ ! newentry->d_maj = i; \ /* replace with new */ \ TTYPE[i] = newentry; \ \ -- Joseph Thomas E/Mail: jpt@msc.edu Minnesota Supercomputer Center, Inc. jpt@cray.com 1200 Washington Ave So. Tel: +1 612 337 3558 Minneapolis, MN 55415-1227 FAX: +1 612 337 3400 You cannot see what I see because you see what you see. You cannot know what I know because you know what you know. "Mostly Harmless" - Douglas Adams