]> git.hungrycats.org Git - linux/commitdiff
[PATCH] thread exit deadlock bug
authorIngo Molnar <mingo@elte.hu>
Sat, 14 Sep 2002 02:33:41 +0000 (19:33 -0700)
committerIngo Molnar <mingo@elte.hu>
Sat, 14 Sep 2002 02:33:41 +0000 (19:33 -0700)
This fixes the Mozilla SMP lockup in the exit path.

kernel/signal.c

index cea84861722b98e873d4acff6b0c97d919a51c2a..c5385ae3282a7e074a63e1b8c7fb8bbb968c87d4 100644 (file)
@@ -280,10 +280,12 @@ void __exit_sighand(struct task_struct *tsk)
                if (atomic_read(&sig->count) == 1 &&
                                        leader->state == TASK_ZOMBIE) {
                        __remove_thread_group(tsk, sig);
+                       spin_unlock(&sig->siglock);
                        do_notify_parent(leader, leader->exit_signal);
-               } else
+               } else {
                        __remove_thread_group(tsk, sig);
-               spin_unlock(&sig->siglock);
+                       spin_unlock(&sig->siglock);
+               }
        }
        clear_tsk_thread_flag(tsk,TIF_SIGPENDING);
        flush_sigqueue(&tsk->pending);