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
This commit is contained in:
parent
0cdf461105
commit
6c5d7af158
@ -182,6 +182,12 @@ syscallret(struct thread *td, int error, struct syscall_args *sa __unused)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user