Skip to content

Commit 89a1d43

Browse files
committed
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.
2 parents 9b731bc + aca411a commit 89a1d43

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

arch/s390/kvm/kvm-s390.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1672,6 +1672,7 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
16721672
KVM_SYNC_CRS |
16731673
KVM_SYNC_ARCH0 |
16741674
KVM_SYNC_PFAULT;
1675+
kvm_s390_set_prefix(vcpu, 0);
16751676
if (test_kvm_facility(vcpu->kvm, 64))
16761677
vcpu->run->kvm_valid_regs |= KVM_SYNC_RICCB;
16771678
/* fprs can be synchronized via vrs, even if the guest has no vx. With
@@ -2361,8 +2362,10 @@ static int kvm_s390_handle_requests(struct kvm_vcpu *vcpu)
23612362
rc = gmap_mprotect_notify(vcpu->arch.gmap,
23622363
kvm_s390_get_prefix(vcpu),
23632364
PAGE_SIZE * 2, PROT_WRITE);
2364-
if (rc)
2365+
if (rc) {
2366+
kvm_make_request(KVM_REQ_MMU_RELOAD, vcpu);
23652367
return rc;
2368+
}
23662369
goto retry;
23672370
}
23682371

0 commit comments

Comments
 (0)