NetBSD Problem Report #43827
From ryo@nerv.org Thu Sep 2 06:33:45 2010
Return-Path: <ryo@nerv.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 3D3A163BC49
for <gnats-bugs@gnats.NetBSD.org>; Thu, 2 Sep 2010 06:33:45 +0000 (UTC)
Message-Id: <20100902053237.CB6FE3179C99@moveq.nerv.org>
Date: Thu, 2 Sep 2010 14:32:37 +0900 (JST)
From: ryo@nerv.org
Reply-To: ryo@nerv.org
To: gnats-bugs@gnats.NetBSD.org
Subject: wapbl_replay_write() does not replay last index of wr_blkhash[]
X-Send-Pr-Version: 3.95
>Number: 43827
>Category: kern
>Synopsis: wapbl_replay_write() does not replay last index of wr_blkhash[]
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Sep 02 06:35:00 +0000 2010
>Closed-Date: Fri Sep 10 10:17:10 +0000 2010
>Last-Modified: Fri Sep 10 10:17:10 +0000 2010
>Originator: Ryo Shimizu
>Release: NetBSD 5.99.39
>Organization:
>Environment:
System: NetBSD moveq 5.99.39 NetBSD 5.99.39 (MOVEQ) #0: Thu Sep 2 04:11:47 JST 2010 ryo@moveq:/src/cvs/NetBSD/sys/arch/i386/compile/MOVEQ i386
Architecture: i386
Machine: i386
>Description:
wapbl_replay_write() does not replay last index of wr_blkhash[].
a size of wr_blkhash[] is wr->wr_blkhashmask + 1.
See below patch.
>How-To-Repeat:
>Fix:
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:58:25 -0000
@@ -2648,7 +2648,7 @@
scratch = wapbl_malloc(MAXBSIZE);
- for (i = 0; i < wr->wr_blkhashmask; ++i) {
+ for (i = 0; i <= wr->wr_blkhashmask; ++i) {
LIST_FOREACH(wb, &wr->wr_blkhash[i], wb_hash) {
off = wb->wb_off;
error = wapbl_circ_read(wr, scratch, fsblklen, &off);
>Release-Note:
>Audit-Trail:
From: Matthias Drochner <drochner@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43827 CVS commit: src/sys/kern
Date: Fri, 10 Sep 2010 10:14:56 +0000
Module Name: src
Committed By: drochner
Date: Fri Sep 10 10:14:56 UTC 2010
Modified Files:
src/sys/kern: vfs_wapbl.c
Log Message:
fix two bugs reported by Ryo Shimizu:
-wrong initialization reported in a followup to PR bin/43336
(looks harmless because it applies to zero-initialized memory, so
LIST_INIT() is a no-op)
-wrong loop count in reply misses a hash bucket (PR kern/43827)
(this was introduced by a post-netbsd-5 change, so it isn't related
to the PR above)
To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/kern/vfs_wapbl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: drochner@NetBSD.org
State-Changed-When: Fri, 10 Sep 2010 10:17:10 +0000
State-Changed-Why:
patch applied, thanks
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.