Skip to content

Commit c6c937d

Browse files
Like Xubonzini
authored andcommitted
KVM: x86/mmu: Passing up the error state of mmu_alloc_shadow_roots()
Just like on the optional mmu_alloc_direct_roots() path, once shadow path reaches "r = -EIO" somewhere, the caller needs to know the actual state in order to enter error handling and avoid something worse. Fixes: 4a38162 ("KVM: MMU: load PDPTRs outside mmu_lock") Signed-off-by: Like Xu <likexu@tencent.com> Reviewed-by: Sean Christopherson <seanjc@google.com> Message-Id: <20220301124941.48412-1-likexu@tencent.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 9ee8363 commit c6c937d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/mmu/mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3565,7 +3565,7 @@ static int mmu_alloc_shadow_roots(struct kvm_vcpu *vcpu)
35653565
out_unlock:
35663566
write_unlock(&vcpu->kvm->mmu_lock);
35673567

3568-
return 0;
3568+
return r;
35693569
}
35703570

35713571
static int mmu_alloc_special_roots(struct kvm_vcpu *vcpu)

0 commit comments

Comments
 (0)