diff options
-rw-r--r-- | include/linux/sched.h | 2 | ||||
-rw-r--r-- | kernel/signal.c | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 0cfcd1c7865e..9c1da0269a18 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1098,7 +1098,7 @@ extern struct sigqueue *sigqueue_alloc(void); | |||
1098 | extern void sigqueue_free(struct sigqueue *); | 1098 | extern void sigqueue_free(struct sigqueue *); |
1099 | extern int send_sigqueue(int, struct sigqueue *, struct task_struct *); | 1099 | extern int send_sigqueue(int, struct sigqueue *, struct task_struct *); |
1100 | extern int send_group_sigqueue(int, struct sigqueue *, struct task_struct *); | 1100 | extern int send_group_sigqueue(int, struct sigqueue *, struct task_struct *); |
1101 | extern int do_sigaction(int, const struct k_sigaction *, struct k_sigaction *); | 1101 | extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *); |
1102 | extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned long); | 1102 | extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned long); |
1103 | 1103 | ||
1104 | /* These can be the second arg to send_sig_info/send_group_sig_info. */ | 1104 | /* These can be the second arg to send_sig_info/send_group_sig_info. */ |
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); |