diff options
author | attilio <attilio@FreeBSD.org> | 2012-09-08 18:35:15 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2012-09-08 18:35:15 +0000 |
commit | 7f498fac4af60ae0a9278ccffe36bed96963ea3d (patch) | |
tree | 98f5b33ba4f4ae11a422f2464f4573c7357e5bd2 /sys/kern/subr_syscall.c | |
parent | 1e61b37b3fa32dbd38244eaef86701972d1c07fc (diff) | |
download | FreeBSD-src-7f498fac4af60ae0a9278ccffe36bed96963ea3d.zip FreeBSD-src-7f498fac4af60ae0a9278ccffe36bed96963ea3d.tar.gz |
Move the checks for td_pinned, td_critnest, TDP_NOFAULTING and
TDP_NOSLEEPING leaking from syscallret() to userret() so that also
trap handling is covered. Also, the check on td_locks is not duplicated
between the two functions.
Reported by: avg
Reviewed by: kib
MFC after: 1 week
Diffstat (limited to 'sys/kern/subr_syscall.c')
-rw-r--r-- | sys/kern/subr_syscall.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c index fdb1dd5..fe5cd0e 100644 --- a/sys/kern/subr_syscall.c +++ b/sys/kern/subr_syscall.c @@ -172,27 +172,6 @@ syscallret(struct thread *td, int error, struct syscall_args *sa __unused) p = td->td_proc; /* - * Check for misbehavior. - */ - WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - syscallname(p, sa->code)); - KASSERT(td->td_critnest == 0, - ("System call %s returning in a critical section", - syscallname(p, sa->code))); - 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))); - KASSERT(td->td_pinned == 0, - ("System call %s returning with pinned thread", - syscallname(p, sa->code))); - - /* * Handle reschedule and other end-of-syscall issues */ userret(td, td->td_frame); |