From: Linus Torvalds <torvalds@linux-foundation.org>
To: Milton Miller <miltonm@bga.com>
Cc: Nick Piggin <npiggin@kernel.dk>,
Alexander Viro <viro@zeniv.linux.org.uk>,
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: Re: [PATCH] fs: synchronize_rcu when unregister_filesystem success not failure
Date: Thu, 14 Apr 2011 08:52:43 -0700 [thread overview]
Message-ID: <BANLkTi=Tt8HRmqODM_qPAbGMeQ9UvVDXfA@mail.gmail.com> (raw)
In-Reply-To: <fs-unreg-rcu@mdm.bga.com>
On Thu, Apr 14, 2011 at 8:41 AM, Milton Miller <miltonm@bga.com> wrote:
>
> 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.
Good catch.
I think this is the bug that then caused us to do commit d863b50ab013
("vfs: call rcu_barrier after ->kill_sb()")
That said, that commit says that "synchronize_rcu()" isn't enough, and
uses rcu_barrier().
Which _should_ mean that there are no actual users that care about RCU
events by the time you actually hit "unregister_filesystem()".
So I think your patch is correct, but won't actually matter. But maybe
I'm missing something.
> Should we call it in both?
No, I think the success path is the one that would matter.
Comments?
Linus
next prev parent reply other threads:[~2011-04-14 15:52 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 ` [PATCH] fs: synchronize_rcu when unregister_filesystem success not failure Milton Miller
2011-04-14 15:52 ` Linus Torvalds [this message]
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='BANLkTi=Tt8HRmqODM_qPAbGMeQ9UvVDXfA@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=dipankar@in.ibm.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miltonm@bga.com \
--cc=npiggin@kernel.dk \
--cc=paulmck@linux.vnet.ibm.com \
--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).