• Eric Paris's avatar
    SELINUX: Make selinux cache VFS RCU walks safe · 9ade0cf4
    Eric Paris authored
    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: default avatarAndi Kleen <ak@linux.intel.com>
    Signed-off-by: default avatarEric Paris <eparis@redhat.com>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    9ade0cf4
avc.c 21.8 KB