summaryrefslogtreecommitdiff
path: root/sys/ufs/mfs/mfs_vfsops.c
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2007-12-04 19:32:14 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2007-12-04 19:32:14 +0000
commit106a7053e6cdfa8d8e57a85b2d3d04546e204a75 (patch)
tree4628aea6f23ada1ea7ee0fefbc99f7a817b54d5c /sys/ufs/mfs/mfs_vfsops.c
parent532e8a1b5bc3e7867c7688b5b122f4770c0a92f3 (diff)
fix out of partition/memory bounds access when accessing blocks at the tail
end; avoids bad address errors; original diff by me with cleanup by millert@; ok millert@
Diffstat (limited to 'sys/ufs/mfs/mfs_vfsops.c')
-rw-r--r--sys/ufs/mfs/mfs_vfsops.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/ufs/mfs/mfs_vfsops.c b/sys/ufs/mfs/mfs_vfsops.c
index 400bfa4a0c5..6264f1a0aef 100644
--- a/sys/ufs/mfs/mfs_vfsops.c
+++ b/sys/ufs/mfs/mfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfs_vfsops.c,v 1.36 2007/11/28 19:31:31 millert Exp $ */
+/* $OpenBSD: mfs_vfsops.c,v 1.37 2007/12/04 19:32:13 otto Exp $ */
/* $NetBSD: mfs_vfsops.c,v 1.10 1996/02/09 22:31:28 christos Exp $ */
/*
@@ -172,14 +172,12 @@ mfs_start(struct mount *mp, int flags, struct proc *p)
struct vnode *vp = VFSTOUFS(mp)->um_devvp;
struct mfsnode *mfsp = VTOMFS(vp);
struct buf *bp;
- caddr_t base;
int sleepreturn = 0;
- base = mfsp->mfs_baseoff;
while (mfsp->mfs_buflist != (struct buf *)-1) {
while ((bp = mfsp->mfs_buflist) != NULL) {
mfsp->mfs_buflist = bp->b_actf;
- mfs_doio(bp, base);
+ mfs_doio(mfsp, bp);
wakeup((caddr_t)bp);
}
/*