[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>

authored by

Paul Jackson and committed by
Linus Torvalds
8c4b8add 3148890b

+1 -2
+1 -2
kernel/fork.c
··· 1124 1124 if (unlikely(p->ptrace & PT_PTRACED)) 1125 1125 __ptrace_link(p, current->parent); 1126 1126 1127 - cpuset_fork(p); 1128 - 1129 1127 attach_pid(p, PIDTYPE_PID, p->pid); 1130 1128 attach_pid(p, PIDTYPE_TGID, p->tgid); 1131 1129 if (thread_group_leader(p)) { ··· 1140 1142 total_forks++; 1141 1143 write_unlock_irq(&tasklist_lock); 1142 1144 proc_fork_connector(p); 1145 + cpuset_fork(p); 1143 1146 retval = 0; 1144 1147 1145 1148 fork_out: