Page MenuHomeFreeBSD

amd64 pmap: Release PTP reference on leaf ptpage allocation failure
ClosedPublic

Authored by bnovkov on Jun 13 2024, 4:27 PM.
Tags
None
Referenced Files
F102714517: D45577.diff
Sat, Nov 16, 6:18 AM
Unknown Object (File)
Fri, Oct 25, 3:32 PM
Unknown Object (File)
Fri, Oct 25, 3:32 PM
Unknown Object (File)
Fri, Oct 25, 3:32 PM
Unknown Object (File)
Fri, Oct 25, 3:22 PM
Unknown Object (File)
Oct 3 2024, 12:18 AM
Unknown Object (File)
Oct 2 2024, 6:54 AM
Unknown Object (File)
Sep 28 2024, 9:34 AM
Subscribers

Details

Summary

aa3bcaa fixed an edge case invloving mlock() and superpage creation
by creating and inserting a leaf pagetable page for mlock'd superpages.
However, the code does not properly release the reference to the
pagetable page in the error handling path.
This commit fixes the issue by adding calls to 'pmap_abort_ptp'
in the error handling path.

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Jun 13 2024, 7:35 PM
sys/amd64/amd64/pmap.c
7599

There are some code paths in this function which handle pdpg == NULL, but I don't think that's possible.

sys/amd64/amd64/pmap.c
7599

Yes, because pmap != kernel_pmap.