From owner-svn-src-stable@freebsd.org Fri May 19 10:16:53 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0038FD71184; Fri, 19 May 2017 10:16:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5D0A2FE; Fri, 19 May 2017 10:16:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JAGpnP052122; Fri, 19 May 2017 10:16:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JAGpEX052121; Fri, 19 May 2017 10:16:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705191016.v4JAGpEX052121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 19 May 2017 10:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318529 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 10:16:53 -0000 Author: kib Date: Fri May 19 10:16:51 2017 New Revision: 318529 URL: https://svnweb.freebsd.org/changeset/base/318529 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/10/sys/kern/kern_sig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Fri May 19 09:04:18 2017 (r318528) +++ stable/10/sys/kern/kern_sig.c Fri May 19 10:16:51 2017 (r318529) @@ -2637,7 +2637,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));