kernel module loader - fix load dependencies from preload modules by kernel
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 4 Aug 2009 23:58:09 +0000 (16:58 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 4 Aug 2009 23:58:09 +0000 (16:58 -0700)
commitb8fb634afadea6b66e03f56e4d4c8e3bb6f12c8a
tree73272a5c8b4ce2baf0476643d0564cd8337760ce
parent4acf215b6ad55a52ed93cfea2d63df6a8576f6f3
kernel module loader - fix load dependencies from preload modules by kernel

The boot loader is supposed to load module dependencies but it misses
a few when e.g. 'snd_hda' is specified in loader.conf.  This resulted
in the kernel itself trying to load the missing dependencies, but the
kernel was running the sysinits for those dependencies immediately during
the preload stage instead of registering them.

Pass a flag to the loader chain to register the sysinits instead of
running them if a dependency is loaded during the preload stage.  This
fixes the problem.  And also, by the way, the loader does not need to
load dependencies any more (though it still does).

Reported-by: corecode, swildner
sys/kern/kern_linker.c
sys/kern/link_aout.c
sys/kern/link_elf.c
sys/kern/vfs_syscalls.c
sys/netgraph/netgraph/ng_base.c
sys/sys/linker.h