Page MenuHomeFreeBSD

vm_page: Fix a logic bug in vm_page_unwire_managed()
ClosedPublic

Authored by markj on Oct 4 2024, 3:08 PM.
Tags
None
Referenced Files
F164984125: D46944.id144441.diff
Wed, Aug 5, 5:33 AM
Unknown Object (File)
Wed, Aug 5, 4:36 AM
Unknown Object (File)
Mon, Jul 27, 9:22 AM
Unknown Object (File)
Fri, Jul 24, 8:29 PM
Unknown Object (File)
Jul 5 2026, 5:56 AM
Unknown Object (File)
Jul 4 2026, 7:04 AM
Unknown Object (File)
Jul 4 2026, 4:10 AM
Unknown Object (File)
Jul 3 2026, 10:58 AM
Subscribers

Details

Summary

When releasing a page reference, we have logic for various cases, based
on the value of the counter. But, the implementation fails to take into
account the possibility that the VPRC_BLOCKED flag is set, which is ORed
into the counter for short windows when removing mappings of a page. If
the flag is set while the last reference is being released, we may fail
to add the page to a page queue when the last wiring reference is
released.

Fix the problem by performing comparisons with VPRC_BLOCKED masked off.
While here, add a related assertion.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable