]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: x86: Gracefully handle __vmalloc() failure during VM allocation
authorSean Christopherson <sean.j.christopherson@intel.com>
Mon, 27 Jan 2020 00:41:11 +0000 (16:41 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 14:12:06 +0000 (16:12 +0200)
commit4b7a883daff750ae8452e4c4e0a5d6c8d5cc670b
treee09eaa74e47764d3b96f434170612bdfad96678c
parentd6962bf24fc86953705e59dfd404c725a986fdf7
KVM: x86: Gracefully handle __vmalloc() failure during VM allocation

commit d18b2f43b9147c8005ae0844fb445d8cc6a87e31 upstream.

Check the result of __vmalloc() to avoid dereferencing a NULL pointer in
the event that allocation failres.

Fixes: d1e5b0e98ea27 ("kvm: Make VM ioctl do valloc for some archs")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/svm.c
arch/x86/kvm/vmx/vmx.c