diff options
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 29a410780aa9..ae60996fedff 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -2491,6 +2491,13 @@ void __set_current_blocked(const sigset_t *newset) | |||
2491 | { | 2491 | { |
2492 | struct task_struct *tsk = current; | 2492 | struct task_struct *tsk = current; |
2493 | 2493 | ||
2494 | /* | ||
2495 | * In case the signal mask hasn't changed, there is nothing we need | ||
2496 | * to do. The current->blocked shouldn't be modified by other task. | ||
2497 | */ | ||
2498 | if (sigequalsets(&tsk->blocked, newset)) | ||
2499 | return; | ||
2500 | |||
2494 | spin_lock_irq(&tsk->sighand->siglock); | 2501 | spin_lock_irq(&tsk->sighand->siglock); |
2495 | __set_task_blocked(tsk, newset); | 2502 | __set_task_blocked(tsk, newset); |
2496 | spin_unlock_irq(&tsk->sighand->siglock); | 2503 | spin_unlock_irq(&tsk->sighand->siglock); |