Date: Wed, 28 Jun 2000 16:50:05 -0700 (PDT) From: Gregory Bond <gnb@itga.com.au> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/19553: "panic: zone: entry not free" in namei Message-ID: <200006282350.QAA33707@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/19553; it has been noted by GNATS. From: Gregory Bond <gnb@itga.com.au> To: David Malone <dwmalone@maths.tcd.ie> Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: kern/19553: "panic: zone: entry not free" in namei Date: Thu, 29 Jun 2000 09:44:28 +1000 This is a multipart MIME message. --==_Exmh_6913581900 Content-Type: text/plain; charset=us-ascii > You often see panics if you compile with INVARIANTS and then load > modules which have not been compiled with INVARIANTS. Could this > be the problem? Well spotted. I was loading cd9660 from a module. Once I compiled it into the kernel (with INVARIANTS), the recipe no longer panics but works as expected. The trick is that isofs/cd9660/cd9660_vnops.c also uses namei_zone, but when compiled without INVARIANTS (in the module), the deallocator is not clearing the "in use" flag that the allocator in the kernel (compiled with INVARIANTS) is checking at the next allocation, which happens to be inside namei(). nfs.ko and union.ko also use namei_zone and would be vulnerable to the same problem. Perhaps a note in LINT next to the INVARIANTS entry explaining this? [Patch attached] And perhaps whatever mechanism is being worked on to manage the versioning of klds can take up this problem? And perhaps namei_zone should be called maxpathlen_zone ! :> Thanks all, this PR can be closed. --==_Exmh_6913581900 Content-Type: text/plain ; name="diffs"; charset=us-ascii Content-Description: diffs Content-Disposition: attachment; filename="diffs" Index: LINT =================================================================== RCS file: /usr/ncvs/src/sys/i386/conf/Attic/LINT,v retrieving revision 1.749.2.11 diff -u -r1.749.2.11 LINT --- LINT 2000/06/21 12:22:37 1.749.2.11 +++ LINT 2000/06/28 23:34:04 @@ -321,6 +321,9 @@ # for these conditions, which can only occur as a result of # programming errors. # +# Note that enabling INVARIANTS in the kernel and not in KLDs (in particular +# at least cd9660.ko, nfs.ko and union.ko) will cause kernel panics. +# options INVARIANTS # --==_Exmh_6913581900-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006282350.QAA33707>