Commit 63bd6144 authored by Roland McGrath's avatar Roland McGrath Committed by Linus Torvalds

[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: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8421a12c
...@@ -1903,22 +1903,16 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, ...@@ -1903,22 +1903,16 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
* Anything else is fatal, maybe with a core dump. * Anything else is fatal, maybe with a core dump.
*/ */
current->flags |= PF_SIGNALED; current->flags |= PF_SIGNALED;
if (sig_kernel_coredump(signr) && if (sig_kernel_coredump(signr)) {
do_coredump((long)signr, signr, regs)) { /*
/* * If it was able to dump core, this kills all
* That killed all other threads in the group and * other threads in the group and synchronizes with
* synchronized with their demise, so there can't * their demise. If we lost the race with another
* be any more left to kill now. The group_exit * thread getting here, it set group_exit_code
* flags are set by do_coredump. Note that * first and our do_group_exit call below will use
* thread_group_empty won't always be true yet, * that value and ignore the one we pass it.
* because those threads were blocked in __exit_mm */
* and we just let them go to finish dying. do_coredump((long)signr, signr, regs);
*/
const int code = signr | 0x80;
BUG_ON(!current->signal->group_exit);
BUG_ON(current->signal->group_exit_code != code);
do_exit(code);
/* NOTREACHED */
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment