From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 27912] Set 'err' in ext4_init_fs() if kset_create_and_add() fails
Date: Wed, 15 Aug 2012 03:03:37 +0000 (UTC) [thread overview]
Message-ID: <20120815030337.A6AA011FC6F@bugzilla.kernel.org> (raw)
In-Reply-To: <bug-27912-13602@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=27912
--- Comment #4 from Theodore Tso <tytso@mit.edu> 2012-08-15 03:03:37 ---
On Tue, Aug 14, 2012 at 03:55:52PM +0000, bugzilla-daemon@bugzilla.kernel.org
wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=27912
Actually, this wasn't quite fixed. Here's a fix which I'll include in
the ext4 tree....
- Ted
>From b0f1e9fa10363b60334ba7837080da91de425be0 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Tue, 14 Aug 2012 23:02:17 -0400
Subject: [PATCH] ext4: return an error if kset_create_and_add fails in
ext4_init_fs()
In the very unlikely case that kset_create_and_add() fails when the
ext4.ko module is being loaded (or during kernel startup) set err so
that it's clear that the module load failed.
https://bugzilla.kernel.org/show_bug.cgi?id=27912
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
fs/ext4/super.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index e7ccbe5..603023b 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5281,8 +5281,10 @@ static int __init ext4_init_fs(void)
if (err)
goto out6;
ext4_kset = kset_create_and_add("ext4", NULL, fs_kobj);
- if (!ext4_kset)
+ if (!ext4_kset) {
+ err = -ENOMEM;
goto out5;
+ }
ext4_proc_root = proc_mkdir("fs/ext4", NULL);
err = ext4_init_feat_adverts();
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
next prev parent reply other threads:[~2012-08-15 3:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-31 20:31 [Bug 27912] New: Set 'err' in ext4_init_fs() if kset_create_and_add() fails bugzilla-daemon
2011-02-01 3:06 ` [Bug 27912] " bugzilla-daemon
2011-02-01 10:27 ` bugzilla-daemon
2011-02-01 21:07 ` bugzilla-daemon
2012-08-14 15:55 ` bugzilla-daemon
2012-08-15 3:03 ` Theodore Ts'o
2012-08-15 3:03 ` bugzilla-daemon [this message]
2012-10-15 21:24 ` bugzilla-daemon
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=20120815030337.A6AA011FC6F@bugzilla.kernel.org \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-ext4@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;
as well as URLs for NNTP newsgroup(s).