Message ID | 4C3D47DD.4010108@cn.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index d94811e..ac63f6f 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3560,6 +3560,8 @@ static int emulator_cmpxchg_emulated(unsigned long addr, goto emul_write; page = gfn_to_page(vcpu->kvm, gpa >> PAGE_SHIFT); + if (is_error_page(page)) + goto emul_write; kaddr = kmap_atomic(page, KM_USER0); kaddr += offset_in_page(gpa);