git: bcd96c3180d6 - main - vm_object: reset iter in page_clean
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 19 Apr 2025 16:35:34 UTC
The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=bcd96c3180d640d57e7a7e372457b085d0c9862e commit bcd96c3180d640d57e7a7e372457b085d0c9862e Author: Doug Moore <dougm@FreeBSD.org> AuthorDate: 2025-04-19 16:32:50 +0000 Commit: Doug Moore <dougm@FreeBSD.org> CommitDate: 2025-04-19 16:32:50 +0000 vm_object: reset iter in page_clean Reset the page iterator unconditionally after busy_acquire(WAITFAIL) fails. Reported by: pho Reported-by: syzbot+b5f9ebf4c2c63a5db681@syzkaller.appspotmail.com Fixes: 9cc73397534e ("vm_page: use iterators in page allocaction") Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D49904 --- sys/vm/vm_object.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index c696408def20..a1cd01d9fec6 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1065,11 +1065,10 @@ rescan: continue; } if (!vm_page_busy_acquire(p, VM_ALLOC_WAITFAIL)) { + pctrie_iter_reset(&pages); if (object->generation != curgeneration && - (flags & OBJPC_SYNC) != 0) { - pctrie_iter_reset(&pages); + (flags & OBJPC_SYNC) != 0) goto rescan; - } np = vm_radix_iter_lookup_ge(&pages, pi); continue; }