vm_map_protect(): remove not needed recalculations of new_prot, new_maxprot

Requested by:	alc
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Konstantin Belousov 2021-01-13 05:04:18 +02:00
parent bd72252aac
commit 420d4be3e4

View File

@ -2836,11 +2836,6 @@ vm_map_protect(vm_map_t map, vm_offset_t start, vm_offset_t end,
return (rv);
}
if ((flags & VM_MAP_PROTECT_SET_PROT) == 0)
new_prot = entry->protection;
if ((flags & VM_MAP_PROTECT_SET_MAXPROT) == 0)
new_maxprot = entry->max_protection;
if ((flags & VM_MAP_PROTECT_SET_PROT) == 0 ||
((new_prot & ~entry->protection) & VM_PROT_WRITE) == 0 ||
ENTRY_CHARGED(entry) ||