summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-05-12 12:15:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-05-12 12:15:39 -0700
commit2842076beb698b8b5f76aa9c987f4aa95b0e74d7 (patch)
tree284172342e9fda3b29b6a54be3d79e7f940c132c
parentba16c1cf11c9f264b5455cb7d57267b39925409a (diff)
parent0a9c28bec202bbd14ae3fd184522490e5f5498b5 (diff)
Merge tag 'for-linus-6.9' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm fix from Paolo Bonzini: - Fix NULL pointer read on s390 in ioctl(KVM_CHECK_EXTENSION) for /dev/kvm * tag 'for-linus-6.9' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: s390: Check kvm pointer when testing KVM_CAP_S390_HPAGE_1M
-rw-r--r--arch/s390/kvm/kvm-s390.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 5147b943a864..7721eb522f43 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -587,7 +587,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
break;
case KVM_CAP_S390_HPAGE_1M:
r = 0;
- if (hpage && !kvm_is_ucontrol(kvm))
+ if (hpage && !(kvm && kvm_is_ucontrol(kvm)))
r = 1;
break;
case KVM_CAP_S390_MEM_OP: