Ed Swierk 1cc5f7142e [PATCH] load_module: no BUG if module_subsys uninitialized
Invoking load_module() before param_sysfs_init() is called crashes in
mod_sysfs_setup(), since the kset in module_subsys is not initialized yet.

In my case, net-pf-1 is getting modprobed as a result of hotplug trying to
create a UNIX socket.  Calls to hotplug begin after the topology_init
initcall.

Another patch for the same symptom (module_subsys-initialize-earlier.patch)
moves param_sysfs_init() to the subsys initcalls, but this is still not
early enough in the boot process in some cases.  In particular,
topology_init() causes /sbin/hotplug to run, which requests net-pf-1 (the
UNIX socket protocol) which can be compiled as a module.  Moving
param_sysfs_init() to the postcore initcalls fixes this particular race,
but there might well be other cases where a usermodehelper causes a module
to load earlier still.

The patch makes load_module() return an error rather than crashing the
kernel if invoked before module_subsys is initialized.

Cc: Mark Huang <mlhuang@cs.princeton.edu>
Cc: Greg KH <greg@kroah.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-25 17:38:36 -07:00
..
2006-09-06 11:00:02 -07:00
2006-09-11 13:32:17 -04:00
2006-09-11 13:32:30 -04:00
2006-09-11 13:32:30 -04:00
2006-08-27 11:01:32 -07:00
2005-04-16 15:20:36 -07:00
2006-09-01 11:39:08 -07:00
2006-03-26 08:57:03 -08:00
2005-10-08 15:00:57 -07:00
2006-09-16 12:54:32 -07:00
2006-07-03 15:27:04 -07:00
2005-04-16 15:20:36 -07:00
2006-09-06 11:00:01 -07:00
2006-04-19 16:27:18 -07:00
2006-07-10 13:24:25 -07:00