Date: Wed, 30 May 2012 13:44:43 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r236309 - head/sys/kern Message-ID: <201205301344.q4UDihob055140@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed May 30 13:44:42 2012 New Revision: 236309 URL: http://svn.freebsd.org/changeset/base/236309 Log: Assert that TDP_NOFAULTING and TDP_NOSPEEPING thread flags do not leak when thread returns from a syscall to usermode. Tested by: pho MFC after: 1 week Modified: head/sys/kern/subr_syscall.c Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Wed May 30 13:33:27 2012 (r236308) +++ head/sys/kern/subr_syscall.c Wed May 30 13:44:42 2012 (r236309) @@ -182,6 +182,12 @@ syscallret(struct thread *td, int error, KASSERT(td->td_locks == 0, ("System call %s returning with %d locks held", syscallname(p, sa->code), td->td_locks)); + KASSERT((td->td_pflags & TDP_NOFAULTING) == 0, + ("System call %s returning with pagefaults disabled", + syscallname(p, sa->code))); + KASSERT((td->td_pflags & TDP_NOSLEEPING) == 0, + ("System call %s returning with sleep disabled", + syscallname(p, sa->code))); /* * Handle reschedule and other end-of-syscall issues
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205301344.q4UDihob055140>