From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH] fs: synchronize_rcu when unregister_filesystem success not failure Date: Thu, 14 Apr 2011 08:52:43 -0700 Message-ID: References: <4DA48AF4.5080803@teksavvy.com> <20110413004938.GE3682@thunk.org> <4DA5ADA6.5060301@teksavvy.com> <5A35771F-49B6-491E-B012-DBE68907E382@mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Cc: Nick Piggin , Alexander Viro , Dipankar Sarma , "Paul E. McKenney" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Milton Miller Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Apr 14, 2011 at 8:41 AM, Milton Miller 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