Skip to content

Commit

Permalink
Merge tag 'for-linus-6.9' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Browse files Browse the repository at this point in the history
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
  • Loading branch information
torvalds committed May 12, 2024
2 parents ba16c1c + 0a9c28b commit 2842076
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/kvm/kvm-s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2842076

Please sign in to comment.