mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 08:30:54 +07:00
KVM: MMU: bail out pagewalk on kvm_read_guest error
Exit the guest pagetable walk loop if reading gpte failed. Otherwise its possible to enter an endless loop processing the previous present pte. Cc: stable@kernel.org Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
parent
d72118ceca
commit
a6085fbaf6
@ -150,7 +150,9 @@ static int FNAME(walk_addr)(struct guest_walker *walker,
|
||||
walker->table_gfn[walker->level - 1] = table_gfn;
|
||||
walker->pte_gpa[walker->level - 1] = pte_gpa;
|
||||
|
||||
kvm_read_guest(vcpu->kvm, pte_gpa, &pte, sizeof(pte));
|
||||
if (kvm_read_guest(vcpu->kvm, pte_gpa, &pte, sizeof(pte)))
|
||||
goto not_present;
|
||||
|
||||
trace_kvm_mmu_paging_element(pte, walker->level);
|
||||
|
||||
if (!is_present_gpte(pte))
|
||||
|
Loading…
Reference in New Issue
Block a user