On Sat, Aug 17, 2013 at 7:28 AM, Theodore Ts'o <tytso@xxxxxxxxx> 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. So rcu_assign_pointer() wants the destination to be a pointer to something in the "__rcu" address space, but here "p" is just a normal kernel pointer (it's a pointer to a regular "struct posix_acl *"). (The unreadable "asn:4" comes from the fact that sparse only has a generic notion of address spaces, where address space zero is the "normal" C pointer address space, and then you can just make up your own ones by number. It was initially done for just "user space", but designed so that it could be extended to other things, and "rcu space" was another later use for checking certain pointer semantics). I guess we should mark i_acl and i_defauly_acl to be RCU-accessed, and then annotate all the accesses properly. The attached patch does so, but I only compile-tested that one file (fs/ext4/acl.c), so it will quite possible cause tons of new warnings elsewhere. But I'm hoping the patch at least illustrates the concept. Linus
Attachment:
patch.diff
Description: Binary data