From: Theodore Ts'o Subject: Re: What does this sparse warning mean in posix_acl.h? Date: Sat, 17 Aug 2013 16:55:54 -0400 Message-ID: <20130817205554.GH30769@thunk.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel , Sparse Mailing-list To: Linus Torvalds Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-sparse-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Sat, Aug 17, 2013 at 09:16:54AM -0700, Linus Torvalds wrote: > On Sat, Aug 17, 2013 at 7:28 AM, Theodore Ts'o wrote: > > > > It apparently has something to do with rcu and "address spaces" but I'm > > not completely sure what sparse is complaining about --- and whether it > > is a false positive or a bug in the posix_acl.h. > > I guess we should mark i_acl and i_defauly_acl to be RCU-accessed, and > then annotate all the accesses properly. I may be missing something, but it looks like the ACL code isn't following the RCU rules at _all_. Even with the missing rcu_derference() macro invocations which you added in your proof-of-concept patch, we're still missing the rcu_read_lock() calls around the use of the rcu pointers. If so, I'm kind of wondering why we haven't noticed massive problems here before. - Ted