Use the correct PTE when changing the attribute of multiple pages.

Submitted by:	andrew (long time ago)
Sponsored by:	Rubicon Communications, LLC (Netgate)
This commit is contained in:
Luiz Otavio O Souza 2018-08-14 15:27:50 +00:00
parent 27f4c235ee
commit 37844eaacf

View File

@ -4813,7 +4813,7 @@ pmap_change_attr_locked(vm_offset_t va, vm_size_t size, int mode)
return (EINVAL);
for (tmpva = base; tmpva < base + size; ) {
pte = pmap_pte(kernel_pmap, va, &lvl);
pte = pmap_pte(kernel_pmap, tmpva, &lvl);
if (pte == NULL)
return (EINVAL);