[PATCH] fork.c: proc_fork_connector() called under write_lock()
authorAndrew Morton <akpm@osdl.org>
Mon, 28 Nov 2005 21:43:48 +0000 (13:43 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 28 Nov 2005 22:42:23 +0000 (14:42 -0800)
Don't do that - it does GFP_KERNEL allocations, for a start.

(Reported by Guillaume Thouvenin <guillaume.thouvenin@bull.net>)

Acked-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/fork.c

index 1c1cf8dc396be6ddebca4c663a9eb234d56cb0cc..d0d49879ab7cb5fe97b9f7a455c7e9e64a9a8bc4 100644 (file)
@@ -1135,13 +1135,13 @@ static task_t *copy_process(unsigned long clone_flags,
                        __get_cpu_var(process_counts)++;
        }
 
-       proc_fork_connector(p);
        if (!current->signal->tty && p->signal->tty)
                p->signal->tty = NULL;
 
        nr_threads++;
        total_forks++;
        write_unlock_irq(&tasklist_lock);
+       proc_fork_connector(p);
        retval = 0;
 
 fork_out: