From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] mod_sysfs_setup() doesn't return errno when kobject_add_dir() failure occurs
Date: Sat, 14 Apr 2007 15:08:12 +0900 [thread overview]
Message-ID: <20070414060812.GA25130@APFDCB5C> (raw)
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)
reply other threads:[~2007-04-14 6:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070414060812.GA25130@APFDCB5C \
--to=akinobu.mita@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox