linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marco Stornelli <marco.stornelli@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Milton Miller <miltonm@bga.com>, 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 18:59:05 +0200	[thread overview]
Message-ID: <4DA727D9.3000904@gmail.com> (raw)
In-Reply-To: <BANLkTi=Tt8HRmqODM_qPAbGMeQ9UvVDXfA@mail.gmail.com>

Il 14/04/2011 17:52, Linus Torvalds ha scritto:
> 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?
>

If I well remember the rcu_barrier was needed for the fs module 
unloading problem. In that case synchronize_rcu() wasn't enough. That 
said, I agree with you, it won't have any impact.

Marco

  reply	other threads:[~2011-04-14 17:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12 17:25 CONFIG_EXT4_USE_FOR_EXT23: rootfs shows as ext2 instead of ext4 Mark Lord
2011-04-13  0:49 ` Ted Ts'o
2011-04-13 14:05   ` Mark Lord
2011-04-13 14:10   ` Mark Lord
2011-04-13 21:00     ` Theodore Tso
2011-04-13 22:30       ` Joel Becker
2011-04-14 15:41         ` [PATCH] ext4: register ext2 and ext3 alias after ext4 Milton Miller
2011-04-14 15:41           ` [PATCH] fs: synchronize_rcu when unregister_filesystem success not failure Milton Miller
2011-04-14 15:52             ` Linus Torvalds
2011-04-14 16:59               ` Marco Stornelli [this message]
2011-04-15  0:49               ` Mark Lord
2011-04-15  1:07           ` [PATCH] ext4: register ext2 and ext3 alias after ext4 Mark Lord
2011-04-14  1:34       ` CONFIG_EXT4_USE_FOR_EXT23: rootfs shows as ext2 instead of ext4 Mark Lord
2011-04-14 12:47         ` Theodore Tso
2011-04-13 16:45   ` John Stoffel
2011-04-13 18:17     ` Ric Wheeler

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=4DA727D9.3000904@gmail.com \
    --to=marco.stornelli@gmail.com \
    --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=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).