]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vm_fault: Shoot down shared mappings in vm_fault_copy_entry()
authorMark Johnston <markj@FreeBSD.org>
Mon, 25 Jul 2022 20:53:21 +0000 (16:53 -0400)
committerMark Johnston <markj@FreeBSD.org>
Tue, 9 Aug 2022 19:58:12 +0000 (15:58 -0400)
commit1120c36b075c9c0df22fc3d2e870ba8f85ceed2c
tree93825313bbe217ada88c4fe214939af351b3621d
parent0aa6d8576d9e7e4463323b82b7dac178f56237e0
vm_fault: Shoot down shared mappings in vm_fault_copy_entry()

As in vm_fault_cow(), it's possible, albeit rare, for multiple vm_maps
to share a shadow object.  When copying a page from a backing object
into the shadow, all mappings of the source page must therefore be
removed.  Otherwise, future operations on the object tree may detect
that the source page is fully shadowed and thus can be freed.

Approved by: so
Security: FreeBSD-SA-22:11.vm
Reviewed by: alc, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35635

(cherry picked from commit 5c50e900ad779fccbf0a230bfb6a68a3e93ccf60)
(cherry picked from commit 9a2a2871c4908cfe7012236912918622e0ed0b32)
sys/vm/vm_fault.c