Date: Fri, 24 Mar 2017 07:22:33 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r315894 - stable/10/sys/kern Message-ID: <201703240722.v2O7MXO5065473@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Mar 24 07:22:32 2017 New Revision: 315894 URL: https://svnweb.freebsd.org/changeset/base/315894 Log: MFC r315453: When clearing altsigstack settings on exec, do it to the right thread. 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 Mar 24 07:14:46 2017 (r315893) +++ stable/10/sys/kern/kern_sig.c Fri Mar 24 07:22:32 2017 (r315894) @@ -964,7 +964,6 @@ execsigs(struct proc *p) * and are now ignored by default). */ PROC_LOCK_ASSERT(p, MA_OWNED); - td = FIRST_THREAD_IN_PROC(p); ps = p->p_sigacts; mtx_lock(&ps->ps_mtx); while (SIGNOTEMPTY(ps->ps_sigcatch)) { @@ -977,6 +976,8 @@ execsigs(struct proc *p) * Reset stack state to the user stack. * Clear set of signals caught on the signal stack. */ + td = curthread; + MPASS(td->td_proc == p); td->td_sigstk.ss_flags = SS_DISABLE; td->td_sigstk.ss_size = 0; td->td_sigstk.ss_sp = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703240722.v2O7MXO5065473>