提交 a6085fba 编写于 作者: M Marcelo Tosatti

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: NMarcelo Tosatti <mtosatti@redhat.com>
上级 d72118ce
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册