HomeFreeBSD

In vm_fault_copy_entry(), we should not assert that entry is charged

Description

In vm_fault_copy_entry(), we should not assert that entry is charged
if the dst_object is not of swap type.

It can only happen when entry does not require copy, otherwise
vm_map_protect() already adds the charge. So the assert was right for
the case where swap object was allocated in the vm_fault_copy_entry(),
but not when it was just copied from src_entry and its type is not
swap.

Reported by: andrew using syzkaller
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D17323

Details

Committed
kibSep 28 2018, 2:11 PM
Reviewer
alc
Differential Revision
D17323: Fix two issues with mprotect(PROT_WRITE) and wiring.
Parents
rS338997: In vm_fault_copy_entry(), collect the code to initialize a newly
Branches
Unknown
Tags
Unknown