HomeFreeBSD

Fix a page table pages leak after LA57.

Description

Fix a page table pages leak after LA57.

If the call to _pmap_allocpte() is not sleepable, it is possible that
allocation of PML4 or PDP page is successful but either PDP or PD page
is not. Restructured code in _pmap_allocpte() leaves zero-referenced
page in the paging structure.

Handle it by checking refcount of the page one level above failed
alloc and free that page if its reference count is zero.

Reported and tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D26293

Details

Provenance
kibAuthored on
Reviewer
markj
Differential Revision
D26293: Fix a page table pages leak after LA57.
Parents
rS365250: Use MLINKS where appropriate for zfs/zpool subcommand pages
Branches
Unknown
Tags
Unknown