Page MenuHomeFreeBSD

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

Authored by bnovkov on Thu, Jun 13, 4:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 16, 7:53 PM
Unknown Object (File)
Sun, Jun 16, 4:59 AM
Unknown Object (File)
Sat, Jun 15, 6:01 PM
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.Thu, Jun 13, 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.