summaryrefslogtreecommitdiffstats
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 @@
#define DEBUG_SIG 0
-#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
-
extern struct task_struct *coproc_owners[];
struct rt_sigframe
@@ -261,7 +259,6 @@ asmlinkage long xtensa_rt_sigreturn(long a0, long a1, long a2, long a3,
if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
goto badframe;
- sigdelsetmask(&set, ~_BLOCKABLE);
set_current_blocked(&set);
if (restore_sigcontext(regs, frame))
@@ -452,15 +449,6 @@ static void do_signal(struct pt_regs *regs)
siginfo_t info;
int signr;
struct k_sigaction ka;
- sigset_t oldset;
-
- if (try_to_freeze())
- goto no_signal;
-
- if (test_thread_flag(TIF_RESTORE_SIGMASK))
- oldset = &current->saved_sigmask;
- else
- oldset = &current->blocked;
task_pt_regs(current)->icountlevel = 0;
@@ -501,19 +489,17 @@ static void do_signal(struct pt_regs *regs)
/* Whee! Actually deliver the signal. */
/* Set up the stack frame */
- ret = setup_frame(signr, &ka, &info, oldset, regs);
+ ret = setup_frame(signr, &ka, &info, sigmask_to_save(), regs);
if (ret)
return;
- clear_thread_flag(TIF_RESTORE_SIGMASK);
- block_sigmask(&ka, signr);
+ signal_delivered(signr, info, ka, regs, 0);
if (current->ptrace & PT_SINGLESTEP)
task_pt_regs(current)->icountlevel = 1;
return;
}
-no_signal:
/* Did we come from a system call? */
if ((signed) regs->syscall >= 0) {
/* Restart the system call - no handlers present */
@@ -532,8 +518,7 @@ no_signal:
}
/* If there's no signal to deliver, we just restore the saved mask. */
- if (test_and_clear_thread_flag(TIF_RESTORE_SIGMASK))
- set_current_blocked(&current->saved_sigmask);
+ restore_saved_sigmask();
if (current->ptrace & PT_SINGLESTEP)
task_pt_regs(current)->icountlevel = 1;
OpenPOWER on IntegriCloud