aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2004-10-22 20:06:59 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-22 20:06:59 -0700
commit63bd6144f191d6d766f15ac39eb83ee9a1e484c6 (patch)
treeaa54c51dfccc2d23aa204b73c5a11d8bf7856de7 /kernel
parent8421a12cfaf1e4446b4d7b9284a2e9859a2a719f (diff)
downloadhistory-63bd6144f191d6d766f15ac39eb83ee9a1e484c6.tar.gz
[PATCH] Invalid BUG_ONs in signal.c
Oh, duh. The race is obvious. Sorry for the confusion there. The BUG_ON's were useful for debugging, since they trigger on a lot of errors, but they _also_ trigger on some unlikely (but valid) races. So just remove them - just fall through to the regular exit code after core-dumping (which does everything right). Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/signal.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index fb156855ed40ea..3da34f1d94a190 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1903,22 +1903,16 @@ relock:
* Anything else is fatal, maybe with a core dump.
*/
current->flags |= PF_SIGNALED;
- if (sig_kernel_coredump(signr) &&
- do_coredump((long)signr, signr, regs)) {
+ if (sig_kernel_coredump(signr)) {
/*
- * That killed all other threads in the group and
- * synchronized with their demise, so there can't
- * be any more left to kill now. The group_exit
- * flags are set by do_coredump. Note that
- * thread_group_empty won't always be true yet,
- * because those threads were blocked in __exit_mm
- * and we just let them go to finish dying.
+ * If it was able to dump core, this kills all
+ * other threads in the group and synchronizes with
+ * their demise. If we lost the race with another
+ * thread getting here, it set group_exit_code
+ * first and our do_group_exit call below will use
+ * that value and ignore the one we pass it.
*/
- const int code = signr | 0x80;
- BUG_ON(!current->signal->group_exit);
- BUG_ON(current->signal->group_exit_code != code);
- do_exit(code);
- /* NOTREACHED */
+ do_coredump((long)signr, signr, regs);
}
/*