When pmap_enter() calls get_pv_entry(), a PV chunk belonging to current
pmap might be reclaimed. If pmap_enter() is updating an existing PTE,
there is nothing preventing reclamation of the PV chunk corresponding to
that PTE, a situation that pmap_enter() doesn't handle. In this case,
because pmap_enter() releases its extra wiring of the PTE's page table
page before calling get_pv_entry(), we can get a use-after-free of the
page table page if the PV chunk reclamation removes all PTEs from that
page.
We would seem to have a similar problem for PDEs, but reclaim_pv_chunk()
currently does not reclaim PV entries for superpage mappings. However,
the comment above reclaim_pv_chunk() gives a different reason for this
choice.
Fix the problem by explicitly passing a "skip VA" to reclaim_pv_chunk().
A PV entry for this VA in locked_pmap does not get reclaimed, avoiding
the problem. As noted above, this is currently not strictly needed for
superpage mappings, but do it any for consistency and robustness.