|
@@ -2491,6 +2491,13 @@ void __set_current_blocked(const sigset_t *newset)
|
|
{
|
|
{
|
|
struct task_struct *tsk = current;
|
|
struct task_struct *tsk = current;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * In case the signal mask hasn't changed, there is nothing we need
|
|
|
|
+ * to do. The current->blocked shouldn't be modified by other task.
|
|
|
|
+ */
|
|
|
|
+ if (sigequalsets(&tsk->blocked, newset))
|
|
|
|
+ return;
|
|
|
|
+
|
|
spin_lock_irq(&tsk->sighand->siglock);
|
|
spin_lock_irq(&tsk->sighand->siglock);
|
|
__set_task_blocked(tsk, newset);
|
|
__set_task_blocked(tsk, newset);
|
|
spin_unlock_irq(&tsk->sighand->siglock);
|
|
spin_unlock_irq(&tsk->sighand->siglock);
|