projects
/
profile
/
ivi
/
kernel-adaptation-intel-automotive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
[profile/ivi/kernel-adaptation-intel-automotive.git]
/
arch
/
x86
/
kvm
/
x86.c
diff --git
a/arch/x86/kvm/x86.c
b/arch/x86/kvm/x86.c
index
be451ee
..
9b96953
100644
(file)
--- a/
arch/x86/kvm/x86.c
+++ b/
arch/x86/kvm/x86.c
@@
-1591,6
+1591,8
@@
static int kvm_dev_ioctl_get_supported_cpuid(struct kvm_cpuid2 *cpuid,
if (cpuid->nent < 1)
goto out;
+ if (cpuid->nent > KVM_MAX_CPUID_ENTRIES)
+ cpuid->nent = KVM_MAX_CPUID_ENTRIES;
r = -ENOMEM;
cpuid_entries = vmalloc(sizeof(struct kvm_cpuid_entry2) * cpuid->nent);
if (!cpuid_entries)