diff options
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 01a1e7f7acf7..ea154104a00b 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -2430,7 +2430,7 @@ sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo) | |||
2430 | } | 2430 | } |
2431 | 2431 | ||
2432 | int | 2432 | int |
2433 | do_sigaction(int sig, const struct k_sigaction *act, struct k_sigaction *oact) | 2433 | do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact) |
2434 | { | 2434 | { |
2435 | struct k_sigaction *k; | 2435 | struct k_sigaction *k; |
2436 | sigset_t mask; | 2436 | sigset_t mask; |
@@ -2454,6 +2454,8 @@ do_sigaction(int sig, const struct k_sigaction *act, struct k_sigaction *oact) | |||
2454 | *oact = *k; | 2454 | *oact = *k; |
2455 | 2455 | ||
2456 | if (act) { | 2456 | if (act) { |
2457 | sigdelsetmask(&act->sa.sa_mask, | ||
2458 | sigmask(SIGKILL) | sigmask(SIGSTOP)); | ||
2457 | /* | 2459 | /* |
2458 | * POSIX 3.3.1.3: | 2460 | * POSIX 3.3.1.3: |
2459 | * "Setting a signal action to SIG_IGN for a signal that is | 2461 | * "Setting a signal action to SIG_IGN for a signal that is |
@@ -2479,8 +2481,6 @@ do_sigaction(int sig, const struct k_sigaction *act, struct k_sigaction *oact) | |||
2479 | read_lock(&tasklist_lock); | 2481 | read_lock(&tasklist_lock); |
2480 | spin_lock_irq(&t->sighand->siglock); | 2482 | spin_lock_irq(&t->sighand->siglock); |
2481 | *k = *act; | 2483 | *k = *act; |
2482 | sigdelsetmask(&k->sa.sa_mask, | ||
2483 | sigmask(SIGKILL) | sigmask(SIGSTOP)); | ||
2484 | sigemptyset(&mask); | 2484 | sigemptyset(&mask); |
2485 | sigaddset(&mask, sig); | 2485 | sigaddset(&mask, sig); |
2486 | rm_from_queue_full(&mask, &t->signal->shared_pending); | 2486 | rm_from_queue_full(&mask, &t->signal->shared_pending); |
@@ -2495,8 +2495,6 @@ do_sigaction(int sig, const struct k_sigaction *act, struct k_sigaction *oact) | |||
2495 | } | 2495 | } |
2496 | 2496 | ||
2497 | *k = *act; | 2497 | *k = *act; |
2498 | sigdelsetmask(&k->sa.sa_mask, | ||
2499 | sigmask(SIGKILL) | sigmask(SIGSTOP)); | ||
2500 | } | 2498 | } |
2501 | 2499 | ||
2502 | spin_unlock_irq(¤t->sighand->siglock); | 2500 | spin_unlock_irq(¤t->sighand->siglock); |