• T
    sched: Use rcu in sys_sched_getscheduler/sys_sched_getparam() · 5fe85be0
    Thomas Gleixner 提交于
    read_lock(&tasklist_lock) does not protect
    sys_sched_getscheduler and sys_sched_getparam() against a
    concurrent update of the policy or scheduler parameters as
    do_sched_setscheduler() does not take the tasklist_lock. The
    accessed integers can be retrieved w/o locking and are snapshots
    anyway.
    
    Using rcu_read_lock() to protect find_task_by_vpid() and prevent
    the task struct from going away is not changing the above
    situation.
    Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
    Cc: Peter Zijlstra <peterz@infradead.org>
    LKML-Reference: <20091209100706.753790977@linutronix.de>
    Signed-off-by: NIngo Molnar <mingo@elte.hu>
    5fe85be0
sched.c 268.7 KB