NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/43375: panic when mount(8)ing umass(4) device (Sony DSC-H50 Digital Camera)
The following reply was made to PR kern/43375; it has been noted by GNATS.
From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/43375: panic when mount(8)ing umass(4) device (Sony
DSC-H50 Digital Camera)
Date: Mon, 31 May 2010 02:19:05 +0000
On Mon, May 31, 2010 at 02:10:05AM +0000, David Holland wrote:
> It may also be helpful to add this:
>
> if (size == 0) {
> panic("bread: zero-length buf requested\n");
> }
>
> to the top of bread() (at around line 732 of sys/kern/vfs_bio.c),
> because if that goes off it will save the trouble of wading through
> the buffer code.
also try this patch:
Index: fs/msdosfs/msdosfs_vfsops.c
===================================================================
RCS file: /cvsroot/src/sys/fs/msdosfs/msdosfs_vfsops.c,v
retrieving revision 1.85
diff -u -p -r1.85 msdosfs_vfsops.c
--- sys/fs/msdosfs/msdosfs_vfsops.c 13 Apr 2010 10:12:43 -0000 1.85
+++ sys/fs/msdosfs/msdosfs_vfsops.c 31 May 2010 02:15:45 -0000
@@ -498,6 +498,10 @@ msdosfs_mountfs(struct vnode *devvp, str
psize = 0;
error = 0;
}
+ if (secsize == 0) {
+ printf("msdosfs: getdisksize said the sector size was 0\n");
+ secsize = DEV_BSIZE;
+ }
if (argp->flags & MSDOSFSMNT_GEMDOSFS) {
bsize = secsize;
I don't know if this is where the zero-length read is coming from, but
it's not a bad bet.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index