From owner-freebsd-current@FreeBSD.ORG Mon Aug 18 14:46:59 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85A151065778 for ; Mon, 18 Aug 2008 14:46:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2A1BA8FC18 for ; Mon, 18 Aug 2008 14:46:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [IPv6:2001:470:1f11:75:2a0:d2ff:fe18:8b38]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m7IEkWkQ052949; Mon, 18 Aug 2008 10:46:52 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Mon, 18 Aug 2008 10:10:13 -0400 User-Agent: KMail/1.9.7 References: <48A84B6F.3090409@linuxbox.com> In-Reply-To: <48A84B6F.3090409@linuxbox.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808181010.14064.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:2001:470:1f11:75::1]); Mon, 18 Aug 2008 10:46:53 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8053/Mon Aug 18 08:42:12 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Matt Benjamin Subject: Re: lock_initalized X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 14:46:59 -0000 On Sunday 17 August 2008 12:01:51 pm Matt Benjamin wrote: > Hi all, > > After tracking down what I think may be a spurious panic on 8.0-CURRENT, > I wanted to ask: > > a. shouldn't this be, lock_initialized? Heh. > b. is it safe to kassert the flag bit is unset on entry to > mtx_init--seems this means caller has to null mtx before calling > mtx_init (the initializer) Correct, it's a check that was inherited from BSD/OS and means that you do have to bzero mtx's before initializing them (or know that your mutex is in a struct that is already zero'd like a device driver's softc). -- John Baldwin