Messages in this thread Patch in this message | | | Date | Sat, 14 Apr 2007 15:08:12 +0900 | From | Akinobu Mita <> | Subject | [PATCH] mod_sysfs_setup() doesn't return errno when kobject_add_dir() failure occurs |
| |
mod_sysfs_setup() doesn't return an errno when kobject_add_dir() for module "holders" directory fails. So caller of mod_sysfs_setup() will keep going and get oops.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Index: 2.6-mm/kernel/module.c =================================================================== --- 2.6-mm.orig/kernel/module.c +++ 2.6-mm/kernel/module.c @@ -1423,8 +1423,10 @@ int mod_sysfs_setup(struct module *mod, goto out; mod->holders_dir = kobject_add_dir(&mod->mkobj.kobj, "holders"); - if (!mod->holders_dir) + if (!mod->holders_dir) { + err = -ENOMEM; goto out_unreg; + } err = module_param_sysfs_setup(mod, kparam, num_params); if (err) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |