From owner-freebsd-current Fri Feb 8 13: 0:21 2002 Delivered-To: freebsd-current@freebsd.org Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by hub.freebsd.org (Postfix) with ESMTP id 9E8FD37B41E; Fri, 8 Feb 2002 13:00:16 -0800 (PST) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020208210016.JZKQ1672.rwcrmhc51.attbi.com@InterJet.elischer.org>; Fri, 8 Feb 2002 21:00:16 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id MAA03330; Fri, 8 Feb 2002 12:59:33 -0800 (PST) Date: Fri, 8 Feb 2002 12:59:32 -0800 (PST) From: Julian Elischer To: John Baldwin Cc: current@freebsd.org Subject: cred stuff.. In-Reply-To: <200202082044.g18KiBL41414@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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