From owner-freebsd-current Tue Jun 11 15:23: 0 2002 Delivered-To: freebsd-current@freebsd.org Received: from mta7.pltn13.pbi.net (mta7.pltn13.pbi.net [64.164.98.8]) by hub.freebsd.org (Postfix) with ESMTP id 5126437B403; Tue, 11 Jun 2002 15:22:38 -0700 (PDT) Received: from kokeb.ambesa.net ([66.122.213.222]) by mta7.pltn13.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTP id <0GXK00MI8BHMDE@mta7.pltn13.pbi.net>; Tue, 11 Jun 2002 15:22:38 -0700 (PDT) Received: from kokeb.ambesa.net (tanstaafl@localhost [127.0.0.1]) by kokeb.ambesa.net (8.12.3/8.12.3) with ESMTP id g5BMRtuj000799; Tue, 11 Jun 2002 15:27:55 -0700 (PDT envelope-from mikem@kokeb.ambesa.net) Received: (from mikem@localhost) by kokeb.ambesa.net (8.12.3/8.12.3/Submit) id g5BMRlBh000798; Tue, 11 Jun 2002 15:27:47 -0700 (PDT envelope-from mikem) Date: Tue, 11 Jun 2002 15:27:47 -0700 From: Mike Makonnen Subject: Re: Fixing "could sleeep..." was (Re: ../../../vm/uma_core.c:132 In-reply-to: To: John Baldwin Cc: freebsd-current@FreeBSD.ORG, jrh@lab.it.uc3m.es, hiten@uk.FreeBSD.org Message-id: <20020611152747.091c2377.makonnen@pacbell.net> MIME-version: 1.0 X-Mailer: Sylpheed version 0.7.0 (GTK+ 1.2.10; i386--freebsd5.0) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT References: <200206111001.g5BA13L3002278@kokeb.ambesa.net> 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 On Tue, 11 Jun 2002 13:07:03 -0400 (EDT) John Baldwin wrote: > > Yes... if you don't go through the setuid/gid family of functions. Currently, > > the only place uifind() is called, besides change_[re]uid() is in proc0_init. My > > assumption was that you need to change the uidinfo only when changing > > ucreds (either an exec or specific seteuid,etc), and that when you change ucreds > > you always crget() a new one and not reuse the old one. So, in this case there > > could be a maximum of 2 allocations (both on the new ucred): one for cr_uidinfo > > and one for cr_ruidinfo. > > Oh, duh, you are right, it should work then. You can implement whichever you please > then. I can see pros and cons cleanliness-wise of both. :) > Disregard my earlier patch. It has a bug. Is it possible to sleep when doing a FREE()? I had assumed not, but it seems I may be mistaken. On which way to go: I like your idea better, because it is less work and less bloat. Sometimes I have to keep reminding myself: "Choose the simplest design that works." Cheers, Mike Makonnen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message