cred: add more asserts for td_realucred == td_ucred
This commit is contained in:
parent
acdc915461
commit
936c24faba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=363767
@ -1881,7 +1881,8 @@ crunuse(struct thread *td)
|
|||||||
{
|
{
|
||||||
struct ucred *cr, *crold;
|
struct ucred *cr, *crold;
|
||||||
|
|
||||||
cr = td->td_ucred;
|
MPASS(td->td_realucred == td->td_ucred);
|
||||||
|
cr = td->td_realucred;
|
||||||
mtx_lock(&cr->cr_mtx);
|
mtx_lock(&cr->cr_mtx);
|
||||||
cr->cr_ref += td->td_ucredref;
|
cr->cr_ref += td->td_ucredref;
|
||||||
td->td_ucredref = 0;
|
td->td_ucredref = 0;
|
||||||
@ -1897,6 +1898,7 @@ crunuse(struct thread *td)
|
|||||||
crold = NULL;
|
crold = NULL;
|
||||||
}
|
}
|
||||||
mtx_unlock(&cr->cr_mtx);
|
mtx_unlock(&cr->cr_mtx);
|
||||||
|
td->td_realucred = NULL;
|
||||||
return (crold);
|
return (crold);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -543,6 +543,7 @@ thread_exit(void)
|
|||||||
(long)p->p_pid, td->td_name);
|
(long)p->p_pid, td->td_name);
|
||||||
SDT_PROBE0(proc, , , lwp__exit);
|
SDT_PROBE0(proc, , , lwp__exit);
|
||||||
KASSERT(TAILQ_EMPTY(&td->td_sigqueue.sq_list), ("signal pending"));
|
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
|
* drop FPU & debug register state storage, or any other
|
||||||
|
Loading…
Reference in New Issue
Block a user