arm: if there's no handler we need to restore sigmask, syscall or no syscall
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 26 Apr 2012 22:15:11 +0000 (18:15 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 21 May 2012 18:36:45 +0000 (14:36 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/arm/kernel/signal.c

index d554025dbcbc237f644532c110ba52b2e2d1ba81..a6c4e780ec7a8ce4db35161dda05b12b25901f7b 100644 (file)
@@ -715,15 +715,13 @@ static void do_signal(struct pt_regs *regs, int syscall)
 #endif
                        }
                }
-
-               /* If there's no signal to deliver, we just put the saved sigmask
-                * back.
-                */
-               if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
-                       clear_thread_flag(TIF_RESTORE_SIGMASK);
-                       sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
-               }
        }
+
+       /* If there's no signal to deliver, we just put the saved sigmask
+        * back.
+        */
+       if (test_and_clear_thread_flag(TIF_RESTORE_SIGMASK))
+               set_current_blocked(&current->saved_sigmask);
 }
 
 asmlinkage void