Date: Fri, 8 Feb 2002 12:59:32 -0800 (PST) From: Julian Elischer <julian@elischer.org> To: John Baldwin <jhb@FreeBSD.org> Cc: current@freebsd.org Subject: cred stuff.. Message-ID: <Pine.BSF.4.21.0202081251580.91961-100000@InterJet.elischer.org> In-Reply-To: <200202082044.g18KiBL41414@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I'd like to commit the code to keep the ucred across userland, with the code to clear it to NULL kept under DEBUG ifdefs. i.e. > in trap(), ast() and syscall() > > if (td->td_ucred != p->p_ucred) { > PROC_LOCK(p); > if (td->td_ucred) { > crfree(td->td_ucred); > td->td_ucred = NULL; > } > if (p->p_ucred != NULL) { > td->td_ucred = crhold(p->p_ucred); > } > PROC_UNLOCK(p); > } and in userret() and ast() >#ifdef DEBUG /*your choice of variable here*/ > PROC_LOCK(p); > if (td->td_ucred) { > crfree(td->td_ucred); > td->td_ucred = NULL; > } > PROC_UNLOCK(p); >#endif To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0202081251580.91961-100000>