cred: add more asserts for td_realucred == td_ucred
This commit is contained in:
parent
d9e2fc360f
commit
c660a28c68
@ -1881,7 +1881,8 @@ crunuse(struct thread *td)
|
||||
{
|
||||
struct ucred *cr, *crold;
|
||||
|
||||
cr = td->td_ucred;
|
||||
MPASS(td->td_realucred == td->td_ucred);
|
||||
cr = td->td_realucred;
|
||||
mtx_lock(&cr->cr_mtx);
|
||||
cr->cr_ref += td->td_ucredref;
|
||||
td->td_ucredref = 0;
|
||||
@ -1897,6 +1898,7 @@ crunuse(struct thread *td)
|
||||
crold = NULL;
|
||||
}
|
||||
mtx_unlock(&cr->cr_mtx);
|
||||
td->td_realucred = NULL;
|
||||
return (crold);
|
||||
}
|
||||
|
||||
|
@ -543,6 +543,7 @@ thread_exit(void)
|
||||
(long)p->p_pid, td->td_name);
|
||||
SDT_PROBE0(proc, , , lwp__exit);
|
||||
KASSERT(TAILQ_EMPTY(&td->td_sigqueue.sq_list), ("signal pending"));
|
||||
MPASS(td->td_realucred == td->td_ucred);
|
||||
|
||||
/*
|
||||
* drop FPU & debug register state storage, or any other
|
||||
|
Loading…
Reference in New Issue
Block a user