From owner-freebsd-smp Sat Nov 25 12:11:45 2000 Delivered-To: freebsd-smp@freebsd.org Received: from io.yi.org (h24-69-199-88.gv.shawcable.net [24.69.199.88]) by hub.freebsd.org (Postfix) with ESMTP id F37F937B4CF; Sat, 25 Nov 2000 12:11:43 -0800 (PST) Received: from io.yi.org (localhost.gvcl1.bc.wave.home.com [127.0.0.1]) by io.yi.org (Postfix) with ESMTP id D6886BA7A; Sat, 25 Nov 2000 12:11:42 -0800 (PST) X-Mailer: exmh version 2.1.1 10/15/1999 To: Alfred Perlstein Cc: John Baldwin , smp@FreeBSD.ORG Subject: Re: uidinfo patches, review please. In-Reply-To: Message from Jake Burkholder of "Sat, 25 Nov 2000 12:07:54 PST." <20001125200754.CC0B8BA7A@io.yi.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 25 Nov 2000 12:11:42 -0800 From: Jake Burkholder Message-Id: <20001125201142.D6886BA7A@io.yi.org> Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > > @@ -735,9 +744,13 @@ > > > printf("freeing uidinfo: uid = %d, proccnt = %ld\n", > > > uip->ui_uid, uip->ui_proccnt); > > > LIST_REMOVE(uip, ui_hash); > > > + mtx_destroy(&uip->ui_mtx); > > > + mtx_exit(&uidhash_mtx, MTX_DEF); > > > > You should mtx_exit(&uip->ui_mtx) before destroying it here. > > This isn't strictly necessary, mtx_destroy handles destroying a > held mutex. I suppose it saves a locked bus op. > No, I take this back. You should exit the mutex, it could screw up witness because the lock will still be in the p_heldmtx list. > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-smp" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message