From owner-cvs-all Mon Jan 14 2: 4: 1 2002 Delivered-To: cvs-all@freebsd.org Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by hub.freebsd.org (Postfix) with ESMTP id A1E5E37B41D for ; Mon, 14 Jan 2002 02:03:45 -0800 (PST) Received: (qmail 18019 invoked from network); 14 Jan 2002 10:03:45 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 14 Jan 2002 10:03:45 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020113182247.A7984@elvis.mu.org> Date: Mon, 14 Jan 2002 02:03:05 -0800 (PST) From: John Baldwin To: Alfred Perlstein Subject: Re: cvs commit: src/sys/netgraph ng_socket.c src/sys/alpha/osf1 Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Peter Wemm Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 14-Jan-02 Alfred Perlstein wrote: > Invariants wants me to bzero the mutex before initializing it otherwise > it freaks out because it sees what _looks_ like an already initialized > mutex... > > lame... If you have a better idea that's not O(n) for seeing if a lock is already initialized... Note that many things that hold locks are allocated with M_ZERO already (softc's for example), so it's not all that big of a requirement. > Rev 1.61 should fix it for you: > > don't initialize the mutex in the temporary struct file, the soo_* > functions just grab f_data and don't muck with anything else so this > should be ok. > > this fixes a panic with invariants where it thinks we've doubly initialized > the filetmp mutex even though all we've done is neglect to bzero it. This sounds like using a struct file is wrong in teh first place and is really a hack. You should just be passing the socket to functions directly. But that would require a bit more work to cleanup the interface I guess. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message