Skip to contentSkip to conversation

Patch "KVM: s390: Disable dirty log retrieval for UCONTROL guests" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Mar 12, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

KVM: s390: Disable dirty log retrieval for UCONTROL guests

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
kvm-s390-disable-dirty-log-retrieval-for-ucontrol-guests.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From e1e8a9624f7ba8ead4f056ff558ed070e86fa747 Mon Sep 17 00:00:00 2001

From: Janosch Frank <[email protected]>
Date: Thu, 2 Feb 2017 16:39:31 +0100
Subject: KVM: s390: Disable dirty log retrieval for UCONTROL guests

From: Janosch Frank <[email protected]>

commit e1e8a9624f7ba8ead4f056ff558ed070e86fa747 upstream.

User controlled KVM guests do not support the dirty log, as they have no single gmap that we can check for changes.

As they have no single gmap, kvm->arch.gmap is NULL and all further referencing to it for dirty checking will result in a NULL dereference.

Let's return -EINVAL if a caller tries to sync dirty logs for a UCONTROL guest.

Fixes 15f36eb ("KVM: s390: Add proper dirty bitmap support to S390 kvm.")
---
 arch/s390/kvm/kvm-s390.c |    3 +++
 1 file changed, 3 insertions(+)
arch/s390/kvm/kvm-s390.c +3 -0
@@ -442,6 +442,9 @@ int kvm_vm_ioctl_get_dirty_log(struct kv
 	struct kvm_memory_slot *memslot;
 	int is_dirty = 0;
 
+	if (kvm_is_ucontrol(kvm))
+		return -EINVAL;
+
 	mutex_lock(&kvm->slots_lock);
 
 	r = -EINVAL;

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/kvm-s390-disable-dirty-log-retrieval-for-ucontrol-guests.patch