From 3a3f11c990df2a56e351c829b8196b6a89f968d7 Mon Sep 17 00:00:00 2001 From: markj Date: Wed, 23 Oct 2019 18:00:22 +0000 Subject: [PATCH] Check for bogus_page in vnode_pager_generic_getpages_done(). We now assert that a page is busy when updating its validity-tracking state, but bogus_page is not busied during a getpages operation. Reported by: syzkaller Reviewed by: alc, kib Discussed with: jeff MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D22124 --- sys/vm/vnode_pager.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 784c65645ada..2133449aea95 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -1149,6 +1149,8 @@ vnode_pager_generic_getpages_done(struct buf *bp) nextoff = tfoff + PAGE_SIZE; mt = bp->b_pages[i]; + if (mt == bogus_page) + continue; if (nextoff <= object->un_pager.vnp.vnp_size) { /*