diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-21 23:42:15 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-01 12:58:49 -0400 |
commit | a610d6e672d6d3723e8da257ad4a8a288a8f2f89 (patch) | |
tree | 2fac6ce7f72756771f4f87583205cc402589dcad /arch/mn10300/kernel | |
parent | 5754f412a3f107cbcd93ee125bef296f2a07539b (diff) |
pull clearing RESTORE_SIGMASK into block_sigmask()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/mn10300/kernel')
-rw-r--r-- | arch/mn10300/kernel/signal.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/arch/mn10300/kernel/signal.c b/arch/mn10300/kernel/signal.c index 26a1d98c62a1..1715478f4e94 100644 --- a/arch/mn10300/kernel/signal.c +++ b/arch/mn10300/kernel/signal.c | |||
@@ -462,11 +462,12 @@ static int handle_signal(int sig, | |||
462 | ret = setup_rt_frame(sig, ka, info, oldset, regs); | 462 | ret = setup_rt_frame(sig, ka, info, oldset, regs); |
463 | else | 463 | else |
464 | ret = setup_frame(sig, ka, oldset, regs); | 464 | ret = setup_frame(sig, ka, oldset, regs); |
465 | if (ret) | ||
466 | return; | ||
465 | 467 | ||
466 | if (ret == 0) | 468 | block_sigmask(ka, sig); |
467 | block_sigmask(ka, sig); | 469 | tracehook_signal_handler(sig, info, ka, regs, |
468 | 470 | test_thread_flag(TIF_SINGLESTEP)); | |
469 | return ret; | ||
470 | } | 471 | } |
471 | 472 | ||
472 | /* | 473 | /* |
@@ -486,15 +487,6 @@ static void do_signal(struct pt_regs *regs) | |||
486 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 487 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
487 | if (signr > 0) { | 488 | if (signr > 0) { |
488 | if (handle_signal(signr, &info, &ka, regs) == 0) { | 489 | if (handle_signal(signr, &info, &ka, regs) == 0) { |
489 | /* a signal was successfully delivered; the saved | ||
490 | * sigmask will have been stored in the signal frame, | ||
491 | * and will be restored by sigreturn, so we can simply | ||
492 | * clear the TIF_RESTORE_SIGMASK flag */ | ||
493 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
494 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
495 | |||
496 | tracehook_signal_handler(signr, &info, &ka, regs, | ||
497 | test_thread_flag(TIF_SINGLESTEP)); | ||
498 | } | 490 | } |
499 | 491 | ||
500 | return; | 492 | return; |