Subject: Re: kern/37576: Reader / writer lock error
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: netbsd-bugs
Date: 12/21/2007 13:10:03
The following reply was made to PR kern/37576; it has been noted by GNATS.
From: Patrick Welche <prlw1@newn.cam.ac.uk>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org, prlw1@cam.ac.uk
Subject: Re: kern/37576: Reader / writer lock error
Date: Fri, 21 Dec 2007 13:05:24 +0000
On Thu, Dec 20, 2007 at 07:20:03PM +0000, Antti Kantee wrote:
> The following reply was made to PR kern/37576; it has been noted by GNATS.
>
> From: Antti Kantee <pooka@cs.hut.fi>
> To: prlw1@cam.ac.uk
> Cc: gnats-bugs@netbsd.org
> Subject: Re: kern/37576: Reader / writer lock error
> Date: Thu, 20 Dec 2007 21:15:07 +0200
>
> On Thu Dec 20 2007 at 18:20:00 +0000, prlw1@cam.ac.uk wrote:
> > mount -t cd9660 /dev/cd1a /cdrom
> >
> > gives the panic:
> >
> > Reader / writer lock error: lockdebug_alloc: already initialized
> >
> > lock address : 0x00000000d0c95f04 type : sleep/adaptive
> > shared holds : 0 exclusive: 0
> > shares wanted: 0 exclusive: 0
> > current cpu : 0 last held: 0
> > current lwp : 0x00000000cd40a8c0 last held: 000000000000000000
> > last locked : 000000000000000000 unlocked : 000000000000000000
> > initialized : 0x00000000c03b5d00
> > owner/count : 000000000000000000 flags : 000000000000000000
>
> Hmm. I started looking at cd9660_vfsops.c and I could've *sworn* that
> cd9660_vget_internal() had the call to genfs_node_init() twice one after
> another. But when I edited the extra call away, I got no cvs diff and
> I can't seem to find anything in cvs indicating it ever would have been
> there twice. I'm probably just going bananas, but check that your copy
> doesn't contain two calls.
You are absolutely right:
% cvs diff -u cd9660_vfsops.c
Index: cd9660_vfsops.c
===================================================================
RCS file: /cvsroot/src/sys/fs/cd9660/cd9660_vfsops.c,v
retrieving revision 1.52
diff -u -r1.52 cd9660_vfsops.c
--- cd9660_vfsops.c 8 Dec 2007 19:29:42 -0000 1.52
+++ cd9660_vfsops.c 21 Dec 2007 13:03:24 -0000
@@ -735,6 +735,8 @@
ip->i_devvp = imp->im_devvp;
genfs_node_init(vp, &cd9660_genfsops);
+ genfs_node_init(vp, &cd9660_genfsops);
+
/*
* Put it onto its hash chain and lock it so that other requests for
* this inode will block if they arrive while we are sleeping waiting
It was patch + cvs update - thank you!
Patrick