• James Morris's avatar
    [PATCH] SELinux: fix netif bugs and simplify. · de1750ca
    James Morris authored
    This patch fixes and simplifies locking in the SELiunux netif cache.
    
    An old problem (which I forgot about) is fixed where a netif lookup can be
    followed by a preemption, causing a race against sel_netif_put().  Kaigai
    Kohei discovered a problem where netif lookups were also not protected
    against races with sel_netif_flush().
    
    The code has now been reworked to fix these problems, eliminate the
    refcounting and remove atomic operations entirely from the read path
    (generally making better use of RCU).  The avc entry ref has been removed
    as part of this simplification in anticipation of an RCU scalability patch
    which removes them in general.
    Signed-off-by: default avatarJames Morris <jmorris@redhat.com>
    Signed-off-by: default avatarStephen Smalley <sds@epoch.ncsc.mil>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    de1750ca
netif.c 5.79 KB