Date: Mon, 18 Aug 2003 15:40:36 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=) <des@des.no> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/fs/pseudofs pseudofs_vnops.c Message-ID: <XFMail.20030818154036.jhb@FreeBSD.org> In-Reply-To: <xzpvfsupy9d.fsf@dwp.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On 18-Aug-2003 Dag-Erling Smørgrav wrote: > John Baldwin <jhb@FreeBSD.org> 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 <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030818154036.jhb>