Linux SPARSE checker discussions
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Sparse Mailing-list <linux-sparse@vger.kernel.org>
Subject: Re: What does this sparse warning mean in posix_acl.h?
Date: Sat, 17 Aug 2013 16:55:54 -0400	[thread overview]
Message-ID: <20130817205554.GH30769@thunk.org> (raw)
In-Reply-To: <CA+55aFxeSzQuF7RR5jDcwwGeL0XFTRsLWe+X0=ybVPAsAkggBA@mail.gmail.com>

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 <tytso@thunk.org> 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

  reply	other threads:[~2013-08-17 20:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-17 14:28 What does this sparse warning mean in posix_acl.h? Theodore Ts'o
2013-08-17 16:16 ` Linus Torvalds
2013-08-17 20:55   ` Theodore Ts'o [this message]
2013-08-17 21:14     ` Linus Torvalds
2013-08-17 21:23       ` Theodore Ts'o
2013-08-17 21:31         ` Linus Torvalds
2013-08-17 21:23       ` Linus Torvalds
2013-08-17 16:17 ` Josh Triplett
2013-08-17 16:33   ` Linus Torvalds

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=20130817205554.GH30769@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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