]> git.baikalelectronics.ru Git - kernel.git/commit
SELINUX: Make selinux cache VFS RCU walks safe
authorEric Paris <eparis@redhat.com>
Fri, 22 Apr 2011 00:23:20 +0000 (17:23 -0700)
committerEric Paris <eparis@redhat.com>
Mon, 25 Apr 2011 20:24:41 +0000 (16:24 -0400)
commit5c2a185a524f126418e3bcb1c89be0f44532ded9
treead5831b52b38ca8157dd3ba4e5dfb75768bd372f
parent9c351c0687d2d2f68eeadaa774f4699bb58874f3
SELINUX: Make selinux cache VFS RCU walks safe

Now that the security modules can decide whether they support the
dcache RCU walk or not it's possible to make selinux a bit more
RCU friendly.  The SELinux AVC and security server access decision
code is RCU safe.  A specific piece of the LSM audit code may not
be RCU safe.

This patch makes the VFS RCU walk retry if it would hit the non RCU
safe chunk of code.  It will normally just work under RCU.  This is
done simply by passing the VFS RCU state as a flag down into the
avc_audit() code and returning ECHILD there if it would have an issue.

Based-on-patch-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
security/selinux/avc.c
security/selinux/hooks.c
security/selinux/include/avc.h