Commit:     240936e18b75937e7866934df723c2db0011d24f
Parent:     a53c46dc8253cc613ad66a2ca7aad6de8b7e61b9
Author:     Akinobu Mita <[EMAIL PROTECTED]>
AuthorDate: Thu Apr 26 00:12:09 2007 -0700
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 10:57:34 2007 -0700

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
 kernel/module.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index dcdb32b..9da5af6 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1148,8 +1148,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 git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to