svn commit: r236648 - stable/9/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Wed Jun 6 01:01:13 UTC 2012
Author: kib
Date: Wed Jun 6 01:01:12 2012
New Revision: 236648
URL: http://svn.freebsd.org/changeset/base/236648
Log:
MFC r236309:
Assert that TDP_NOFAULTING and TDP_NOSPEEPING thread flags do not leak
when thread returns from a syscall to usermode.
Modified:
stable/9/sys/kern/subr_syscall.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/kern/subr_syscall.c
==============================================================================
--- stable/9/sys/kern/subr_syscall.c Wed Jun 6 00:20:13 2012 (r236647)
+++ stable/9/sys/kern/subr_syscall.c Wed Jun 6 01:01:12 2012 (r236648)
@@ -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
More information about the svn-src-stable-9
mailing list