Subject: kern/15063: adosfs + VOP_BMAP + hole == clrbuf ?
To: None <gnats-bugs@gnats.netbsd.org>
From: None <lha@stacken.kth.se>
List: netbsd-bugs
Date: 12/27/2001 12:38:36
>Number:         15063
>Category:       kern
>Synopsis:       adosfs + VOP_BMAP + hole == clrbuf ?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 27 03:39:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Love
>Release:        NetBSD 1.5ZA
>Organization:
	Stacken Computer Club
>Environment:
System: NetBSD nutcracker.stacken.kth.se 1.5ZA NetBSD 1.5ZA (NUTCRACKER) #45: Mon Dec 24 19:45:09 CET 2001 lha@nutcracker.stacken.kth.se:/usr/src/sys/arch/i386/compile/NUTCRACKER i386
Architecture: i386
Machine: i386
>Description:

	adosfs_strategy():

	doesn't clrbuf() on VOP_BMAP returning a hole (*bnp == -1)

	If I understand this right, it should, at least in the read
	case. Since adosfs doesn't support write (it returns
	EOPNOTSUPP in adosfs_write) , we doesn't need care
	about that.

>How-To-Repeat:

	Read the code.

>Fix:

Index: sys/adosfs/advnops.c
===================================================================
RCS file: /cvsroot/syssrc/sys/adosfs/advnops.c,v
retrieving revision 1.62
diff -w -u -r1.62 advnops.c
--- advnops.c   2001/11/12 22:59:18     1.62
+++ advnops.c   2001/12/27 11:28:04
@@ -408,6 +408,8 @@
                        biodone(bp);
                        goto reterr;
                }
+               if ((long)bp->b_blkno == -1)
+                       clrbuf(bp);
        }
        if ((long)bp->b_blkno == -1) {
                biodone(bp);
>Release-Note:
>Audit-Trail:
>Unformatted: