From: Milton Miller <miltonm@bga.com>
To: Nick Piggin <npiggin@kernel.dk>,
Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Dipankar Sarma <dipankar@in.ibm.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
<linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] fs: synchronize_rcu when unregister_filesystem success not failure
Date: Thu, 14 Apr 2011 10:41:24 -0500 [thread overview]
Message-ID: <fs-unreg-rcu@mdm.bga.com> (raw)
In-Reply-To: <ext4-masq@mdm.bga.com>
While checking unregister_filesystem for saftey vs extra calls for
"ext4: register ext2 and ext3 alias after ext4" I realized that
the synchronize_rcu() was called on the error path but not on
the success path.
Should we call it in both?
Cc: stable (2.6.38)
Signed-off-by: Milton Miller <miltonm@bga.com>
Index: work.git/fs/filesystems.c
===================================================================
--- work.git.orig/fs/filesystems.c 2011-04-14 10:06:44.360068116 -0500
+++ work.git/fs/filesystems.c 2011-04-14 10:08:41.880061794 -0500
@@ -110,14 +110,13 @@ int unregister_filesystem(struct file_sy
*tmp = fs->next;
fs->next = NULL;
write_unlock(&file_systems_lock);
+ synchronize_rcu();
return 0;
}
tmp = &(*tmp)->next;
}
write_unlock(&file_systems_lock);
- synchronize_rcu();
-
return -EINVAL;
}
next parent reply other threads:[~2011-04-14 15:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4DA48AF4.5080803@teksavvy.com>
[not found] ` <20110413004938.GE3682@thunk.org>
[not found] ` <4DA5ADA6.5060301@teksavvy.com>
[not found] ` <5A35771F-49B6-491E-B012-DBE68907E382@mit.edu>
[not found] ` <ext4-masq@mdm.bga.com>
2011-04-14 15:41 ` Milton Miller [this message]
2011-04-14 15:52 ` [PATCH] fs: synchronize_rcu when unregister_filesystem success not failure Linus Torvalds
2011-04-14 16:59 ` Marco Stornelli
2011-04-15 0:49 ` Mark Lord
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=fs-unreg-rcu@mdm.bga.com \
--to=miltonm@bga.com \
--cc=dipankar@in.ibm.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@kernel.dk \
--cc=paulmck@linux.vnet.ibm.com \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/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).