summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_syscall.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2012-08-22 20:02:42 +0000
committerjhb <jhb@FreeBSD.org>2012-08-22 20:02:42 +0000
commit9e9c95ef1d9199a55e30c8f9f85adc3e3f2d19eb (patch)
tree5d5d83bfa22d5e1a30a8d7a4ce5eee1891360605 /sys/kern/subr_syscall.c
parente62296e213b1516802511208b33400ade1a77091 (diff)
downloadFreeBSD-src-9e9c95ef1d9199a55e30c8f9f85adc3e3f2d19eb.zip
FreeBSD-src-9e9c95ef1d9199a55e30c8f9f85adc3e3f2d19eb.tar.gz
Assert that system calls do not leak a pinned thread (via sched_pin()) to
userland.
Diffstat (limited to 'sys/kern/subr_syscall.c')
-rw-r--r--sys/kern/subr_syscall.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c
index 5aee684..fdb1dd5 100644
--- a/sys/kern/subr_syscall.c
+++ b/sys/kern/subr_syscall.c
@@ -188,6 +188,9 @@ syscallret(struct thread *td, int error, struct syscall_args *sa __unused)
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
OpenPOWER on IntegriCloud