NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/43336: fsck wapbl assertion failure after crash
The following reply was made to PR bin/43336; it has been noted by GNATS.
From: Ryo SHIMIZU <ryo%nerv.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: gnats-admin%netbsd.org@localhost, Hauke Fath
<hf%spg.tu-darmstadt.de@localhost>,
David Holland <dholland-bugs%netbsd.org@localhost>
Subject: Re: bin/43336: fsck wapbl assertion failure after crash
Date: Thu, 02 Sep 2010 14:33:37 +0900
I found a bug in wapbl_blkhash_init().
It will be initialized incorrectly because wr->wr_blkhashmask is unspecified
called from fsck_ffs (!_KERNEL)
Index: vfs_wapbl.c
===================================================================
RCS file: /cvsroot/src/sys/kern/vfs_wapbl.c,v
retrieving revision 1.36
diff -a -u -r1.36 vfs_wapbl.c
--- vfs_wapbl.c 21 Apr 2010 19:50:57 -0000 1.36
+++ vfs_wapbl.c 2 Sep 2010 04:56:09 -0000
@@ -2095,9 +2095,9 @@
for (hashsize = 1; hashsize < size; hashsize <<= 1)
continue;
wr->wr_blkhash = wapbl_malloc(hashsize *
sizeof(*wr->wr_blkhash));
- for (i = 0; i < wr->wr_blkhashmask; i++)
- LIST_INIT(&wr->wr_blkhash[i]);
wr->wr_blkhashmask = hashsize - 1;
+ for (i = 0; i <= wr->wr_blkhashmask; i++)
+ LIST_INIT(&wr->wr_blkhash[i]);
}
#endif /* ! _KERNEL */
}
--
ryo shimizu
Home |
Main Index |
Thread Index |
Old Index