aboutsummaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vnode_pager.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index f79e516ecc4c..2b174bc59b8a 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -792,8 +792,10 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
* calculate the size of the transfer
*/
size = count * PAGE_SIZE;
+ KASSERT(count > 0, ("zero count"));
if ((foff + size) > object->un_pager.vnp.vnp_size)
size = object->un_pager.vnp.vnp_size - foff;
+ KASSERT(size > 0, ("zero size"));
/*
* round up physical size for real devices.