aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/signal.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-05-02 09:59:21 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-06-01 12:58:48 -0400
commitb7f9a11a6cf1ea9ee6be3eb2b90d91327a09ad14 (patch)
tree7d5a5f469aea8ac2b3e1ab41e05a6abafcb2b694 /arch/ia64/kernel/signal.c
parent51a7b448d4134e3e8eec633435e3e8faee14a828 (diff)
new helper: sigmask_to_save()
replace boilerplate "should we use ->saved_sigmask or ->blocked?" with calls of obvious inlined helper... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/ia64/kernel/signal.c')
-rw-r--r--arch/ia64/kernel/signal.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c
index 39d8f3afff49..9fee6d6a3f21 100644
--- a/arch/ia64/kernel/signal.c
+++ b/arch/ia64/kernel/signal.c
@@ -415,10 +415,10 @@ setup_frame (int sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *set,
415} 415}
416 416
417static long 417static long
418handle_signal (unsigned long sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *oldset, 418handle_signal (unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
419 struct sigscratch *scr) 419 struct sigscratch *scr)
420{ 420{
421 if (!setup_frame(sig, ka, info, oldset, scr)) 421 if (!setup_frame(sig, ka, info, sigmask_to_save(), scr))
422 return 0; 422 return 0;
423 423
424 block_sigmask(ka, sig); 424 block_sigmask(ka, sig);
@@ -440,7 +440,6 @@ void
440ia64_do_signal (struct sigscratch *scr, long in_syscall) 440ia64_do_signal (struct sigscratch *scr, long in_syscall)
441{ 441{
442 struct k_sigaction ka; 442 struct k_sigaction ka;
443 sigset_t *oldset;
444 siginfo_t info; 443 siginfo_t info;
445 long restart = in_syscall; 444 long restart = in_syscall;
446 long errno = scr->pt.r8; 445 long errno = scr->pt.r8;
@@ -453,11 +452,6 @@ ia64_do_signal (struct sigscratch *scr, long in_syscall)
453 if (!user_mode(&scr->pt)) 452 if (!user_mode(&scr->pt))
454 return; 453 return;
455 454
456 if (current_thread_info()->status & TS_RESTORE_SIGMASK)
457 oldset = &current->saved_sigmask;
458 else
459 oldset = &current->blocked;
460
461 /* 455 /*
462 * This only loops in the rare cases of handle_signal() failing, in which case we 456 * This only loops in the rare cases of handle_signal() failing, in which case we
463 * need to push through a forced SIGSEGV. 457 * need to push through a forced SIGSEGV.
@@ -507,7 +501,7 @@ ia64_do_signal (struct sigscratch *scr, long in_syscall)
507 * Whee! Actually deliver the signal. If the delivery failed, we need to 501 * Whee! Actually deliver the signal. If the delivery failed, we need to
508 * continue to iterate in this loop so we can deliver the SIGSEGV... 502 * continue to iterate in this loop so we can deliver the SIGSEGV...
509 */ 503 */
510 if (handle_signal(signr, &ka, &info, oldset, scr)) { 504 if (handle_signal(signr, &ka, &info, scr)) {
511 /* 505 /*
512 * A signal was successfully delivered; the saved 506 * A signal was successfully delivered; the saved
513 * sigmask will have been stored in the signal frame, 507 * sigmask will have been stored in the signal frame,