From owner-p4-projects@FreeBSD.ORG Fri Aug 8 12:26:37 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 83E2A37B404; Fri, 8 Aug 2003 12:26:36 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 359DE37B401; Fri, 8 Aug 2003 12:26:36 -0700 (PDT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B74343FCB; Fri, 8 Aug 2003 12:26:35 -0700 (PDT) (envelope-from sam@errno.com) Received: from melange.errno.com (melange.errno.com [66.127.85.82]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.9) with ESMTP id h78JQU7N059336 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 8 Aug 2003 12:26:32 -0700 (PDT) (envelope-from sam@errno.com) Date: Fri, 08 Aug 2003 12:26:30 -0700 From: Sam Leffler To: Jon Baldwin Message-ID: <157867631.1060345590@melange.errno.com> In-Reply-To: References: X-Mailer: Mulberry/3.0.3 (Win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline cc: Perforce Change Reviews Subject: RE: PERFORCE change 35749 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2003 19:26:37 -0000 > On 07-Aug-2003 Sam Leffler wrote: >> http://perforce.freebsd.org/chv.cgi?CH=35749 >> >> Change 35749 by sam@sam_ebb on 2003/08/07 15:29:55 >> >> o must unlock before destroying mutex >> o must lock rt_gwroute before freeing when cleaning up on error > > It's ok to own a mutex when you destroy it. It's actually fairly > desirable in fact since it is a rather foolproof way of making sure > someone else doesn't own it. Of course, they could still be blocked on > it.. :-/ That's what I thought and was counting on, but I was getting crashes in the mutex code trying to clear the sleep list. Unlocking first fixed it (and I looked around and saw some other code doing it too--I think). I'll add it to my TODO list to look at. Sam