aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha/kernel/signal.c')
-rw-r--r--arch/alpha/kernel/signal.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c
index f6db3032ddf0..a8c97d42ec8e 100644
--- a/arch/alpha/kernel/signal.c
+++ b/arch/alpha/kernel/signal.c
@@ -226,7 +226,6 @@ do_sigreturn(struct sigcontext __user *sc, struct pt_regs *regs,
226 if (__get_user(set.sig[0], &sc->sc_mask)) 226 if (__get_user(set.sig[0], &sc->sc_mask))
227 goto give_sigsegv; 227 goto give_sigsegv;
228 228
229 sigdelsetmask(&set, ~_BLOCKABLE);
230 set_current_blocked(&set); 229 set_current_blocked(&set);
231 230
232 if (restore_sigcontext(sc, regs, sw)) 231 if (restore_sigcontext(sc, regs, sw))
@@ -261,7 +260,6 @@ do_rt_sigreturn(struct rt_sigframe __user *frame, struct pt_regs *regs,
261 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) 260 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
262 goto give_sigsegv; 261 goto give_sigsegv;
263 262
264 sigdelsetmask(&set, ~_BLOCKABLE);
265 set_current_blocked(&set); 263 set_current_blocked(&set);
266 264
267 if (restore_sigcontext(&frame->uc.uc_mcontext, regs, sw)) 265 if (restore_sigcontext(&frame->uc.uc_mcontext, regs, sw))
@@ -468,12 +466,9 @@ static inline void
468handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info, 466handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info,
469 struct pt_regs * regs, struct switch_stack *sw) 467 struct pt_regs * regs, struct switch_stack *sw)
470{ 468{
471 sigset_t *oldset = &current->blocked; 469 sigset_t *oldset = sigmask_to_save();
472 int ret; 470 int ret;
473 471
474 if (test_thread_flag(TIF_RESTORE_SIGMASK))
475 oldset = &current->saved_sigmask;
476
477 if (ka->sa.sa_flags & SA_SIGINFO) 472 if (ka->sa.sa_flags & SA_SIGINFO)
478 ret = setup_rt_frame(sig, ka, info, oldset, regs, sw); 473 ret = setup_rt_frame(sig, ka, info, oldset, regs, sw);
479 else 474 else
@@ -483,12 +478,7 @@ handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info,
483 force_sigsegv(sig, current); 478 force_sigsegv(sig, current);
484 return; 479 return;
485 } 480 }
486 block_sigmask(ka, sig); 481 signal_delivered(sig, info, ka, regs, 0);
487 /* A signal was successfully delivered, and the
488 saved sigmask was stored on the signal frame,
489 and will be restored by sigreturn. So we can
490 simply clear the restore sigmask flag. */
491 clear_thread_flag(TIF_RESTORE_SIGMASK);
492} 482}
493 483
494static inline void 484static inline void
@@ -572,9 +562,7 @@ do_signal(struct pt_regs * regs, struct switch_stack * sw,
572 } 562 }
573 563
574 /* If there's no signal to deliver, we just restore the saved mask. */ 564 /* If there's no signal to deliver, we just restore the saved mask. */
575 if (test_and_clear_thread_flag(TIF_RESTORE_SIGMASK)) 565 restore_saved_sigmask();
576 set_current_blocked(&current->saved_sigmask);
577
578 if (single_stepping) 566 if (single_stepping)
579 ptrace_set_bpt(current); /* re-set breakpoint */ 567 ptrace_set_bpt(current); /* re-set breakpoint */
580} 568}