aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/xtensa/kernel/signal.c')
-rw-r--r--arch/xtensa/kernel/signal.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c
index ea7e17778a75..b9f8e5850d3a 100644
--- a/arch/xtensa/kernel/signal.c
+++ b/arch/xtensa/kernel/signal.c
@@ -30,8 +30,6 @@
30 30
31#define DEBUG_SIG 0 31#define DEBUG_SIG 0
32 32
33#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
34
35extern struct task_struct *coproc_owners[]; 33extern struct task_struct *coproc_owners[];
36 34
37struct rt_sigframe 35struct rt_sigframe
@@ -261,7 +259,6 @@ asmlinkage long xtensa_rt_sigreturn(long a0, long a1, long a2, long a3,
261 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) 259 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
262 goto badframe; 260 goto badframe;
263 261
264 sigdelsetmask(&set, ~_BLOCKABLE);
265 set_current_blocked(&set); 262 set_current_blocked(&set);
266 263
267 if (restore_sigcontext(regs, frame)) 264 if (restore_sigcontext(regs, frame))
@@ -452,15 +449,6 @@ static void do_signal(struct pt_regs *regs)
452 siginfo_t info; 449 siginfo_t info;
453 int signr; 450 int signr;
454 struct k_sigaction ka; 451 struct k_sigaction ka;
455 sigset_t oldset;
456
457 if (try_to_freeze())
458 goto no_signal;
459
460 if (test_thread_flag(TIF_RESTORE_SIGMASK))
461 oldset = &current->saved_sigmask;
462 else
463 oldset = &current->blocked;
464 452
465 task_pt_regs(current)->icountlevel = 0; 453 task_pt_regs(current)->icountlevel = 0;
466 454
@@ -501,19 +489,17 @@ static void do_signal(struct pt_regs *regs)
501 489
502 /* Whee! Actually deliver the signal. */ 490 /* Whee! Actually deliver the signal. */
503 /* Set up the stack frame */ 491 /* Set up the stack frame */
504 ret = setup_frame(signr, &ka, &info, oldset, regs); 492 ret = setup_frame(signr, &ka, &info, sigmask_to_save(), regs);
505 if (ret) 493 if (ret)
506 return; 494 return;
507 495
508 clear_thread_flag(TIF_RESTORE_SIGMASK); 496 signal_delivered(signr, info, ka, regs, 0);
509 block_sigmask(&ka, signr);
510 if (current->ptrace & PT_SINGLESTEP) 497 if (current->ptrace & PT_SINGLESTEP)
511 task_pt_regs(current)->icountlevel = 1; 498 task_pt_regs(current)->icountlevel = 1;
512 499
513 return; 500 return;
514 } 501 }
515 502
516no_signal:
517 /* Did we come from a system call? */ 503 /* Did we come from a system call? */
518 if ((signed) regs->syscall >= 0) { 504 if ((signed) regs->syscall >= 0) {
519 /* Restart the system call - no handlers present */ 505 /* Restart the system call - no handlers present */
@@ -532,8 +518,7 @@ no_signal:
532 } 518 }
533 519
534 /* If there's no signal to deliver, we just restore the saved mask. */ 520 /* If there's no signal to deliver, we just restore the saved mask. */
535 if (test_and_clear_thread_flag(TIF_RESTORE_SIGMASK)) 521 restore_saved_sigmask();
536 set_current_blocked(&current->saved_sigmask);
537 522
538 if (current->ptrace & PT_SINGLESTEP) 523 if (current->ptrace & PT_SINGLESTEP)
539 task_pt_regs(current)->icountlevel = 1; 524 task_pt_regs(current)->icountlevel = 1;