pull clearing RESTORE_SIGMASK into block_sigmask()
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / kernel / signal.c
index 95a9d9d8122b82368a505f1bcacdd522b94ce7a7..b9be7e0fe41a0ad55cbe4acecc38777c3bff53cc 100644 (file)
@@ -2382,6 +2382,12 @@ void block_sigmask(struct k_sigaction *ka, int signr)
 {
        sigset_t blocked;
 
+       /* A signal was successfully delivered, and the
+          saved sigmask was stored on the signal frame,
+          and will be restored by sigreturn.  So we can
+          simply clear the restore sigmask flag.  */
+       clear_restore_sigmask();
+
        sigorsets(&blocked, &current->blocked, &ka->sa.sa_mask);
        if (!(ka->sa.sa_flags & SA_NODEFER))
                sigaddset(&blocked, signr);