Date: Fri, 4 Oct 1996 11:31:34 -0500 (CDT) From: jpt@msc.edu (Joseph Thomas) To: freebsd-bugs@freefall.freebsd.org Subject: Missed sys/kern/kern_conf.c on LKM support Message-ID: <199610041631.LAA10414@uh.msc.edu>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610041631.LAA10414>
