Date: Wed, 05 Sep 2012 09:49:54 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: John Baldwin <jhb@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r239587 - head/sys/kern Message-ID: <5046F612.5090500@FreeBSD.org> In-Reply-To: <201208222002.q7MK2gVY089435@svn.freebsd.org> References: <201208222002.q7MK2gVY089435@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
on 22/08/2012 23:02 John Baldwin said the following: > Author: jhb > Date: Wed Aug 22 20:02:42 2012 > New Revision: 239587 > URL: http://svn.freebsd.org/changeset/base/239587 > > Log: > Assert that system calls do not leak a pinned thread (via sched_pin()) to > userland. > > Modified: > head/sys/kern/subr_syscall.c > > Modified: head/sys/kern/subr_syscall.c > ============================================================================== > --- head/sys/kern/subr_syscall.c Wed Aug 22 20:01:57 2012 (r239586) > +++ head/sys/kern/subr_syscall.c Wed Aug 22 20:02:42 2012 (r239587) > @@ -188,6 +188,9 @@ syscallret(struct thread *td, int error, I wonder if userret() would be a better place for this assert as well as the asserts that were already there. userret seems to cover more cases and includes the syscallret case. > KASSERT((td->td_pflags & TDP_NOSLEEPING) == 0, > ("System call %s returning with sleep disabled", > syscallname(p, sa->code))); > + KASSERT(td->td_pinned == 0, > + ("System call %s returning with pinned thread", > + syscallname(p, sa->code))); > > /* > * Handle reschedule and other end-of-syscall issues > -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5046F612.5090500>