Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2019 04:50:47 +0000 (UTC)
From:      "Jason A. Harmening" <jah@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r344561 - head/sys/vm
Message-ID:  <201902260450.x1Q4oleP052064@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jah
Date: Tue Feb 26 04:50:46 2019
New Revision: 344561
URL: https://svnweb.freebsd.org/changeset/base/344561

Log:
  Fix incorrect assertion in vnode_pager_generic_getpages()
  
  Reviewed by:	kib, glebius
  MFC after:	1 week

Modified:
  head/sys/vm/vnode_pager.c

Modified: head/sys/vm/vnode_pager.c
==============================================================================
--- head/sys/vm/vnode_pager.c	Tue Feb 26 03:37:12 2019	(r344560)
+++ head/sys/vm/vnode_pager.c	Tue Feb 26 04:50:46 2019	(r344561)
@@ -793,7 +793,7 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page
 
 	KASSERT(foff < object->un_pager.vnp.vnp_size,
 	    ("%s: page %p offset beyond vp %p size", __func__, m[0], vp));
-	KASSERT(count <= sizeof(bp->b_pages),
+	KASSERT(count <= nitems(bp->b_pages),
 	    ("%s: requested %d pages", __func__, count));
 
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902260450.x1Q4oleP052064>