diff options
author | Radim Krčmář <rkrcmar@redhat.com> | 2016-08-12 10:01:51 (GMT) |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2016-08-12 10:01:51 (GMT) |
commit | 89a1d43ead15902b1f15768aa1121a2e2d5935af (patch) | |
tree | bd3a992b3d960de25e63fa133ba3a0a96d0e0591 /arch | |
parent | 9b731bcfdec4c159ad2e4312e25d69221709b96a (diff) | |
parent | aca411a4b17a4aebe14ecdf253373db5b7ee6058 (diff) | |
download | linux-89a1d43ead15902b1f15768aa1121a2e2d5935af.tar.xz |
Merge tag 'kvm-s390-master-4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux
KVM: s390: Fixes for 4.8 (via kvm/master)
Here are two fixes found by fuzzing of the ioctl interface.
Both cases can trigger a WARN_ON_ONCE from user space.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 3f3ae48..f142215 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -1672,6 +1672,7 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu) KVM_SYNC_CRS | KVM_SYNC_ARCH0 | KVM_SYNC_PFAULT; + kvm_s390_set_prefix(vcpu, 0); if (test_kvm_facility(vcpu->kvm, 64)) vcpu->run->kvm_valid_regs |= KVM_SYNC_RICCB; /* fprs can be synchronized via vrs, even if the guest has no vx. With @@ -2361,8 +2362,10 @@ retry: rc = gmap_mprotect_notify(vcpu->arch.gmap, kvm_s390_get_prefix(vcpu), PAGE_SIZE * 2, PROT_WRITE); - if (rc) + if (rc) { + kvm_make_request(KVM_REQ_MMU_RELOAD, vcpu); return rc; + } goto retry; } |