From 7968207ee75064fa5df05e5f6955fd830ee7dac0 Mon Sep 17 00:00:00 2001 From: Srivatsa Vaddagiri Date: Tue, 8 May 2007 00:27:25 -0700 Subject: [PATCH] --- yaml --- r: 54623 b: refs/heads/master c: dd9037a26a1e6ebec9121b4681c414dc77189a90 h: refs/heads/master i: 54621: 275e39a81ca0216958141218a427c6c0e8cdfda0 54619: 69d4d4a71cd9576a8adca8565f7b931c6dc82b76 54615: 69a6b243c97a72cc9c40193d1ad6b743907eb588 54607: 819631e41e3e2e7268fe69e68cf6cdd423a0d52e 54591: 6aa9cac1e1252ca72221fc67f56c4de8d29f9ef7 v: v3 --- [refs] | 2 +- trunk/kernel/cpuset.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 84977d74fd11..1a253660e842 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e5f00f42f35e6f4699f105a3bd56874847cbf72f +refs/heads/master: dd9037a26a1e6ebec9121b4681c414dc77189a90 diff --git a/trunk/kernel/cpuset.c b/trunk/kernel/cpuset.c index d240349cbf0f..bde714db2b26 100644 --- a/trunk/kernel/cpuset.c +++ b/trunk/kernel/cpuset.c @@ -2200,10 +2200,6 @@ void cpuset_fork(struct task_struct *child) * it is holding that mutex while calling check_for_release(), * which calls kmalloc(), so can't be called holding callback_mutex(). * - * We don't need to task_lock() this reference to tsk->cpuset, - * because tsk is already marked PF_EXITING, so attach_task() won't - * mess with it, or task is a failed fork, never visible to attach_task. - * * the_top_cpuset_hack: * * Set the exiting tasks cpuset to the root cpuset (top_cpuset). @@ -2242,8 +2238,10 @@ void cpuset_exit(struct task_struct *tsk) { struct cpuset *cs; + task_lock(current); cs = tsk->cpuset; tsk->cpuset = &top_cpuset; /* the_top_cpuset_hack - see above */ + task_unlock(current); if (notify_on_release(cs)) { char *pathbuf = NULL;