]> git.baikalelectronics.ru Git - kernel.git/commit
apparmor: fix incorrect type assignment when freeing proxies
authorJohn Johansen <john.johansen@canonical.com>
Wed, 16 Aug 2017 16:33:48 +0000 (09:33 -0700)
committerJohn Johansen <john.johansen@canonical.com>
Fri, 22 Sep 2017 20:00:58 +0000 (13:00 -0700)
commit0dd82813f3ef4728acb16dbbbea8742c4e83e04c
tree6a22655d27fa6875d3146b4be3b08b737b6fa5c8
parenta135bca67d84035252f4325fba06e891a9b56746
apparmor: fix incorrect type assignment when freeing proxies

sparse reports

poisoning the proxy->label before freeing the struct is resulting in
a sparse build warning.
../security/apparmor/label.c:52:30: warning: incorrect type in assignment (different address spaces)
../security/apparmor/label.c:52:30:    expected struct aa_label [noderef] <asn:4>*label
../security/apparmor/label.c:52:30:    got struct aa_label *<noident>

fix with RCU_INIT_POINTER as this is one of those cases where
rcu_assign_pointer() is not needed.

Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/label.c