Subject: Re: kern/37034: Processes stuck on vnlock: accessing msdos fs mounted from img (vnconfig)
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Antti Kantee <pooka@cs.hut.fi>
List: netbsd-bugs
Date: 09/28/2007 13:10:04
The following reply was made to PR kern/37034; it has been noted by GNATS.

From: Antti Kantee <pooka@cs.hut.fi>
To: gnats-bugs@NetBSD.org
Cc: netbsd@eq.cz
Subject: Re: kern/37034: Processes stuck on vnlock: accessing msdos fs mounted from img (vnconfig)
Date: Fri, 28 Sep 2007 16:09:52 +0300

 On Fri Sep 28 2007 at 10:30:09 +0000, rudolf wrote:
 >  I also forget to mention in the report that the filesystem in the img is 
 >  slightly corrupted. I don't know if this could cause this problem, under 
 >  Linux I can access the fs, just not each file in it.
 
 Yes, that would likely be the cause.  If you can share the image, that
 would be great.
 
 Meanwhile, try if this helps:
 
 Index: msdosfs_denode.c
 ===================================================================
 RCS file: /cvsroot/src/sys/fs/msdosfs/msdosfs_denode.c,v
 retrieving revision 1.17
 diff -p -u -r1.17 msdosfs_denode.c
 --- msdosfs_denode.c	25 Nov 2006 12:17:30 -0000	1.17
 +++ msdosfs_denode.c	28 Sep 2007 13:09:17 -0000
 @@ -335,8 +335,10 @@ deget(pmp, dirclust, diroffset, depp)
  		/* leave the other fields as garbage */
  	} else {
  		error = readep(pmp, dirclust, diroffset, &bp, &direntptr);
 -		if (error)
 +		if (error) {
 +			vput(nvp);
  			return (error);
 +		}
  		DE_INTERNALIZE(ldep, direntptr);
  		brelse(bp);
  	}
 
 -- 
 Antti Kantee <pooka@iki.fi>                     Of course he runs NetBSD
 http://www.iki.fi/pooka/                          http://www.NetBSD.org/
     "la qualité la plus indispensable du cuisinier est l'exactitude"