svn commit: r307654 - head/sys/vm
Gleb Smirnoff
glebius at FreeBSD.org
Wed Oct 19 19:50:10 UTC 2016
Author: glebius
Date: Wed Oct 19 19:50:09 2016
New Revision: 307654
URL: https://svnweb.freebsd.org/changeset/base/307654
Log:
Fix incorrect assertion that could miss overflows.
Reviewed by: kib
Modified:
head/sys/vm/vnode_pager.c
Modified: head/sys/vm/vnode_pager.c
==============================================================================
--- head/sys/vm/vnode_pager.c Wed Oct 19 19:42:01 2016 (r307653)
+++ head/sys/vm/vnode_pager.c Wed Oct 19 19:50:09 2016 (r307654)
@@ -953,7 +953,7 @@ vnode_pager_generic_getpages(struct vnod
if (a_rahead)
*a_rahead = bp->b_pgafter;
- KASSERT(bp->b_npages <= sizeof(bp->b_pages),
+ KASSERT(bp->b_npages <= nitems(bp->b_pages),
("%s: buf %p overflowed", __func__, bp));
/*
More information about the svn-src-all
mailing list