aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1998-05-01 15:10:59 +0000
committerPeter Wemm <peter@FreeBSD.org>1998-05-01 15:10:59 +0000
commitb1951f402864c5ed187dee4bc5fc92a7f548f78a (patch)
tree3c5520bffb8a86e1060f267065b8e159dddfc8ad /sys/kern/vfs_bio.c
parentf806d5a25707e4d6c8405b2c9dcc99b0b10801e0 (diff)
downloadsrc-b1951f402864c5ed187dee4bc5fc92a7f548f78a.tar.gz
src-b1951f402864c5ed187dee4bc5fc92a7f548f78a.zip
vm_page_is_valid() wasn't expecting a large offset argument, it's
expecting a sub-page offset. We were passing the file position, and vm_page_bits() could do some interesting things when base was larger PAGE_SIZE. if (size > PAGE_SIZE - base) size = PAGE_SIZE - base; is interesting when (PAGE_SIZE - base) is negative. I could imagine that this could have interesting consequences for memory page -> device block bit validation.
Notes
Notes: svn path=/head/; revision=35590
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 3c2b4c153a9f..686158bcb256 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -11,7 +11,7 @@
* 2. Absolutely no warranty of function or purpose is made by the author
* John S. Dyson.
*
- * $Id: vfs_bio.c,v 1.162 1998/04/17 22:36:51 des Exp $
+ * $Id: vfs_bio.c,v 1.163 1998/05/01 15:04:35 peter Exp $
*/
/*
@@ -1322,7 +1322,8 @@ inmem(struct vnode * vp, daddr_t blkno)
m = vm_page_lookup(obj, OFF_TO_IDX(off + toff));
if (!m)
return 0;
- if (vm_page_is_valid(m, (vm_offset_t) (toff + off), tinc) == 0)
+ if (vm_page_is_valid(m,
+ (vm_offset_t) ((toff + off) & PAGE_MASK), tinc) == 0)
return 0;
}
return 1;