summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPaul Jackson <pj@sgi.com>2005-11-28 13:44:05 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-28 14:42:24 -0800
commit8c4b8add83c93306b07d78469fd351dc462e4b66 (patch)
treee99523b961cb84f0462057d329de27e1d85546e6 /kernel
parent3148890bfa4f36c9949871264e06ef4d449eeff9 (diff)
downloadlinux-8c4b8add83c93306b07d78469fd351dc462e4b66.tar.gz
linux-8c4b8add83c93306b07d78469fd351dc462e4b66.tar.bz2
linux-8c4b8add83c93306b07d78469fd351dc462e4b66.zip
[PATCH] cpuset fork locking fix
Move the cpuset_fork() call below the write_unlock_irq call in kernel/fork.c copy_process(). Since the cpuset-dual-semaphore-locking-overhaul.patch, the cpuset_fork() routine acquires task_lock(), so cannot be called while holding the tasklist_lock for write. Signed-off-by: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/fork.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index d0d49879ab7c..fb8572a42297 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1124,8 +1124,6 @@ static task_t *copy_process(unsigned long clone_flags,
if (unlikely(p->ptrace & PT_PTRACED))
__ptrace_link(p, current->parent);
- cpuset_fork(p);
-
attach_pid(p, PIDTYPE_PID, p->pid);
attach_pid(p, PIDTYPE_TGID, p->tgid);
if (thread_group_leader(p)) {
@@ -1142,6 +1140,7 @@ static task_t *copy_process(unsigned long clone_flags,
total_forks++;
write_unlock_irq(&tasklist_lock);
proc_fork_connector(p);
+ cpuset_fork(p);
retval = 0;
fork_out: