diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-12-09 10:15:01 +0000 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-14 17:11:35 +0100 |
commit | 23f5d142519621b16cf2b378cf8adf4dcf01a616 (patch) | |
tree | c7907cb635ea1ad6cab71598d687b752c17adf37 /drivers | |
parent | 5fe85be081edf0ac92d83f9c39e0ab5c1371eb82 (diff) |
sched: Use rcu in sched_get/set_affinity()
tasklist_lock is held read locked to protect the
find_task_by_vpid() call and to prevent the task going away.
sched_setaffinity acquires a task struct ref and drops tasklist
lock right away. The access to the cpus_allowed mask is
protected by rq->lock.
rcu_read_lock() provides the same protection here.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20091209100706.789059966@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions