--- linux-2.6.17.11.orig/kernel/module.c 2006-08-23 21:16:33.000000000 +0000 +++ linux-2.6.17.11/kernel/module.c 2006-09-22 05:19:03.000000000 +0000 @@ -998,6 +998,12 @@ { int err; + if (!module_subsys.kset.subsys) { + printk(KERN_ERR "%s: module_subsys not initialized\n", + mod->name); + err = -EINVAL; + goto out; + } memset(&mod->mkobj.kobj, 0, sizeof(mod->mkobj.kobj)); err = kobject_set_name(&mod->mkobj.kobj, "%s", mod->name); if (err)