Author: kib Date: Fri May 19 09:04:18 2017 New Revision: 318528 URL: https://svnweb.freebsd.org/changeset/base/318528
Log: MFC r318243: Do not wake up sleeping thread in reschedule_signals() if the signal is blocked. The spurious wakeup might result in spurious EINTR. PR: 219228 Modified: stable/11/sys/kern/kern_sig.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sig.c ============================================================================== --- stable/11/sys/kern/kern_sig.c Fri May 19 08:38:03 2017 (r318527) +++ stable/11/sys/kern/kern_sig.c Fri May 19 09:04:18 2017 (r318528) @@ -2664,7 +2664,9 @@ reschedule_signals(struct proc *p, sigse signotify(td); if (!(flags & SIGPROCMASK_PS_LOCKED)) mtx_lock(&ps->ps_mtx); - if (p->p_flag & P_TRACED || SIGISMEMBER(ps->ps_sigcatch, sig)) + if (p->p_flag & P_TRACED || + (SIGISMEMBER(ps->ps_sigcatch, sig) && + !SIGISMEMBER(td->td_sigmask, sig))) tdsigwakeup(td, sig, SIG_CATCH, (SIGISMEMBER(ps->ps_sigintr, sig) ? EINTR : ERESTART)); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"