diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -2202,6 +2202,7 @@ proc_set_cred_init(struct proc *p, struct ucred *newcred) { + MPASS(p->p_ucred == NULL); p->p_ucred = crcowget(newcred); }