aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/signal.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index c64c891ca0a..3ec405132c7 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -3085,8 +3085,15 @@ EXPORT_SYMBOL(allow_signal);
void disallow_signal(int sig)
{
+ sigset_t mask;
+
+ sigemptyset(&mask);
+ sigaddset(&mask, sig);
+
spin_lock_irq(&current->sighand->siglock);
current->sighand->action[(sig)-1].sa.sa_handler = SIG_IGN;
+ flush_sigqueue_mask(&mask, &current->signal->shared_pending);
+ flush_sigqueue_mask(&mask, &current->pending);
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
}