KVM: s390: Fix for 6.9
Christian Borntraeger
maintainerPaolo,
one fix for s390.
The following changes since commit 16c20208b9c2fff73015ad4e609072feafbf81ad:
Merge tag 'kvmarm-fixes-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD (2024-04-30 13:50:55 -0400)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-master-6.9-1
for you to fetch changes up to 175f2f5bcdfce9e728f1ff956a50f28824d28791:
KVM: s390: Check kvm pointer when testing KVM_CAP_S390_HPAGE_1M (2024-05-02 09:41:38 +0200)
----------------------------------------------------------------
KVM: s390: Fix for 6.9
Fix wild read on capability check.
----------------------------------------------------------------
Jean-Philippe Brucker (1):
KVM: s390: Check kvm pointer when testing KVM_CAP_S390_HPAGE_1M
arch/s390/kvm/kvm-s390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Christian Borntraeger
maintainer[GIT PULL 1/1] KVM: s390: Check kvm pointer when testing KVM_CAP_S390_HPAGE_1M
From: Jean-Philippe Brucker <[email protected]>
KVM allows issuing the KVM_CHECK_EXTENSION ioctl either on the /dev/kvm fd or the VM fd. In the first case, kvm_vm_ioctl_check_extension() is called with kvm==NULL. Ensure we don't dereference the pointer in that case.
Message-ID: <[email protected]>
--- arch/s390/kvm/kvm-s390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/kvm/kvm-s390.c +1 -1
@@ -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 :
Signature · 1 line
2.44.0
Paolo Bonzini
maintainerQuoted 4 lines · Christian Borntraeger
Paolo,
one fix for s390.
Pulled, thanks.
Paolo
Quoted 24 lines
The following changes since commit
16c20208b9c2fff73015ad4e609072feafbf81ad:Merge tag 'kvmarm-fixes-6.9-2' of
git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarminto HEAD (2024-04-30 13:50:55 -0400)are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.gittags/kvm-s390-master-6.9-1for you to fetch changes up to
175f2f5bcdfce9e728f1ff956a50f28824d28791:KVM: s390: Check kvm pointer when testing
KVM_CAP_S390_HPAGE_1M(2024-05-02 09:41:38 +0200)----------------------------------------------------------------
KVM: s390: Fix for 6.9Fix wild read on capability check.
----------------------------------------------------------------
Jean-Philippe Brucker (1):
KVM: s390: Check kvm pointer when testingKVM_CAP_S390_HPAGE_1March/s390/kvm/kvm-s390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)