• Chris Wright's avatar
    [PATCH] delay rq_lock acquisition in setscheduler · 67a2dad3
    Chris Wright authored
    Doing access control checks with rq_lock held can cause deadlock when
    audit messages are created (via printk or audit infrastructure) which
    trigger a wakeup and deadlock, as noted by both SELinux and SubDomain
    folks.  This patch will let the security checks happen w/out lock held,
    then re-sample the p->policy in case it was raced. 
    
    Originally from John Johansen <johansen@immunix.com>, reworked by me.
    AFAIK, this version drew no objections from Ingo or Andrea. 
    
    From: John Johansen <johansen@immunix.com>
    Acked-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarChris Wright <chrisw@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    67a2dad3
sched.c 113 KB