From dd663b5dcc1edce6fde27a962016092eb494a198 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Wed, 15 Feb 2006 22:13:24 +0300 Subject: [PATCH] --- yaml --- r: 20337 b: refs/heads/master c: 3f17da699431ec48540beabc55c54d4b5e66c8e7 h: refs/heads/master i: 20335: 4b17c9d80e29b3a17edbbebe4072b0d430feb087 v: v3 --- [refs] | 2 +- trunk/kernel/fork.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index a73e5dcc943b..1c4e5c49911c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7775aa7690c26b3c5606090a43533a7a7429eb91 +refs/heads/master: 3f17da699431ec48540beabc55c54d4b5e66c8e7 diff --git a/trunk/kernel/fork.c b/trunk/kernel/fork.c index 8e88b374cee9..3683ce10f4a9 100644 --- a/trunk/kernel/fork.c +++ b/trunk/kernel/fork.c @@ -1123,8 +1123,8 @@ static task_t *copy_process(unsigned long clone_flags, p->real_parent = current; p->parent = p->real_parent; + spin_lock(¤t->sighand->siglock); if (clone_flags & CLONE_THREAD) { - spin_lock(¤t->sighand->siglock); /* * Important: if an exit-all has been started then * do not create this new thread - the whole thread @@ -1162,8 +1162,6 @@ static task_t *copy_process(unsigned long clone_flags, */ p->it_prof_expires = jiffies_to_cputime(1); } - - spin_unlock(¤t->sighand->siglock); } /* @@ -1189,6 +1187,7 @@ static task_t *copy_process(unsigned long clone_flags, nr_threads++; total_forks++; + spin_unlock(¤t->sighand->siglock); write_unlock_irq(&tasklist_lock); proc_fork_connector(p); return p;