cpuset fork locking fix
Subsystems (3)
PATCH 1/1 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 <[email protected]>
---
kernel/fork.c | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-)
kernel/fork.c +1 -2
@@ -1131,8 +1131,6 @@ static task_t *copy_process(unsigned lonif (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)) {
@@ -1149,6 +1147,7 @@ static task_t *copy_process(unsigned lon nr_threads++; total_forks++;write_unlock_irq (&tasklist_lock); +cpuset_fork (p); retval =0 ; fork_out:
Signature · 3 lines
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.650.933.1373