• Jiri Slaby's avatar
    rlimits: do security check under task_lock · 86f162f4
    Jiri Slaby authored
    Do security_task_setrlimit under task_lock. Other tasks may change
    limits under our hands while we are checking limits inside the
    function. From now on, they can't.
    
    Note that all the security work is done under a spinlock here now.
    Security hooks count with that, they are called from interrupt context
    (like security_task_kill) and with spinlocks already held (e.g.
    capable->security_capable).
    Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
    Acked-by: default avatarJames Morris <jmorris@namei.org>
    Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
    86f162f4
sys.c 38.8 KB