]> git.baikalelectronics.ru Git - kernel.git/commit
posix_acl: de-union a_refcount and a_rcu
authorJeff Layton <jlayton@redhat.com>
Mon, 11 Jul 2016 13:10:06 +0000 (09:10 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 11 Jul 2016 17:48:02 +0000 (13:48 -0400)
commit6f33e99d6bdd273f8aaeb43f0976f88061d221c3
tree8b73f1e73b4461597b4d951c7f49c92b3bb000a0
parent32084c677d4df1bb442b77c97bc973097b11b53a
posix_acl: de-union a_refcount and a_rcu

Currently the two are unioned together, but I don't think that's safe.

It looks like get_cached_acl could race with the last put in
posix_acl_release. get_cached_acl calls atomic_inc_not_zero on
a_refcount, but that field could have already been clobbered by
call_rcu, and may no longer be zero. Fix this by de-unioning the two
fields.

Fixes: 56bf83516301 (posix_acl: Inode acl caching fixes)
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/linux/posix_acl.h