projects
/
platform
/
kernel
/
linux-rpi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
KVM: x86: Gracefully handle __vmalloc() failure during VM allocation
[platform/kernel/linux-rpi.git]
/
arch
/
x86
/
kvm
/
svm.c
diff --git
a/arch/x86/kvm/svm.c
b/arch/x86/kvm/svm.c
index
0745912
..
51ff6b3
100644
(file)
--- a/
arch/x86/kvm/svm.c
+++ b/
arch/x86/kvm/svm.c
@@
-1926,6
+1926,10
@@
static struct kvm *svm_vm_alloc(void)
struct kvm_svm *kvm_svm = __vmalloc(sizeof(struct kvm_svm),
GFP_KERNEL_ACCOUNT | __GFP_ZERO,
PAGE_KERNEL);
+
+ if (!kvm_svm)
+ return NULL;
+
return &kvm_svm->kvm;
}