diff options
author | Paul Jackson <pj@sgi.com> | 2005-11-28 16:44:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-28 17:42:24 -0500 |
commit | 8c4b8add83c93306b07d78469fd351dc462e4b66 (patch) | |
tree | e99523b961cb84f0462057d329de27e1d85546e6 /kernel/fork.c | |
parent | 3148890bfa4f36c9949871264e06ef4d449eeff9 (diff) |
[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/fork.c')
-rw-r--r-- | kernel/fork.c | 3 |
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, | |||
1124 | if (unlikely(p->ptrace & PT_PTRACED)) | 1124 | if (unlikely(p->ptrace & PT_PTRACED)) |
1125 | __ptrace_link(p, current->parent); | 1125 | __ptrace_link(p, current->parent); |
1126 | 1126 | ||
1127 | cpuset_fork(p); | ||
1128 | |||
1129 | attach_pid(p, PIDTYPE_PID, p->pid); | 1127 | attach_pid(p, PIDTYPE_PID, p->pid); |
1130 | attach_pid(p, PIDTYPE_TGID, p->tgid); | 1128 | attach_pid(p, PIDTYPE_TGID, p->tgid); |
1131 | if (thread_group_leader(p)) { | 1129 | if (thread_group_leader(p)) { |
@@ -1142,6 +1140,7 @@ static task_t *copy_process(unsigned long clone_flags, | |||
1142 | total_forks++; | 1140 | total_forks++; |
1143 | write_unlock_irq(&tasklist_lock); | 1141 | write_unlock_irq(&tasklist_lock); |
1144 | proc_fork_connector(p); | 1142 | proc_fork_connector(p); |
1143 | cpuset_fork(p); | ||
1145 | retval = 0; | 1144 | retval = 0; |
1146 | 1145 | ||
1147 | fork_out: | 1146 | fork_out: |