]> err.no Git - linux-2.6/commit
Fix race between attach_task and cpuset_exit
authorSrivatsa Vaddagiri <vatsa@in.ibm.com>
Tue, 8 May 2007 07:27:25 +0000 (00:27 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:05 +0000 (11:15 -0700)
commitdd9037a26a1e6ebec9121b4681c414dc77189a90
treecbce9dc3406943b0026a5de01bd64d42714a9413
parente5f00f42f35e6f4699f105a3bd56874847cbf72f
Fix race between attach_task and cpuset_exit

Currently cpuset_exit() changes the exiting task's ->cpuset pointer w/o
taking task_lock().  This can lead to ugly races between attach_task and
cpuset_exit.  Details of the races are described at
http://lkml.org/lkml/2007/3/24/132.

Patch below closes those races.

Signed-off-by: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/cpuset.c