From owner-cvs-src@FreeBSD.ORG Mon Aug 18 12:40:20 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBCC537B404 for ; Mon, 18 Aug 2003 12:40:19 -0700 (PDT) Received: from mail.speakeasy.net (mail15.speakeasy.net [216.254.0.215]) by mx1.FreeBSD.org (Postfix) with ESMTP id E6F2643FDD for ; Mon, 18 Aug 2003 12:40:15 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 15659 invoked from network); 18 Aug 2003 19:40:14 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 18 Aug 2003 19:40:14 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id h7IJeC9s085901; Mon, 18 Aug 2003 15:40:12 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Mon, 18 Aug 2003 15:40:36 -0400 (EDT) From: John Baldwin To: (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=) cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/fs/pseudofs pseudofs_vnops.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2003 19:40:20 -0000 On 18-Aug-2003 Dag-Erling Smørgrav wrote: > John Baldwin writes: >> Log: >> The allproc lock is a sx lock, not a mutex, so fix the assertion. This >> asserts that the sx lock is held, but does not specify if the lock is held >> shared or exclusive, thus either type of lock satisfies the assertion. > > My bad - but why didn't I get a warning about the incorrect pointer > type? And why did the code run fine with INVARIANT_SUPPORT and > INVARIANTS defined? Just lucky? It shouldn't have compiled in a static kernel, and the module should have failed to load. You did get a warning actually, that is how I noticed this. module builds don't error out on warnings though, only kernel builds do. Ah 'allproc' is the name of the actual linked list head, so the module did load and link ok, it just examined the head of the allproc list and treated that as a mutex. I've no idea why it worked. Perhaps your kernel did not have INVARIANT_SUPPORT defined in its config? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/