From: Thomas Gleixner Date: Wed, 9 Dec 2009 10:15:01 +0000 (+0000) Subject: sched: Use rcu in sched_get/set_affinity() X-Git-Tag: v2.6.33-rc2~48^2~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23f5d142519621b16cf2b378cf8adf4dcf01a616;p=pandora-kernel.git 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 Cc: Peter Zijlstra LKML-Reference: <20091209100706.789059966@linutronix.de> Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed