diff options
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 05d571f6f196..7fa89c39c64f 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -1562,7 +1562,7 @@ static int msr_io(struct kvm_vcpu *vcpu, struct kvm_msrs __user *user_msrs, | |||
1562 | 1562 | ||
1563 | r = -ENOMEM; | 1563 | r = -ENOMEM; |
1564 | size = sizeof(struct kvm_msr_entry) * msrs.nmsrs; | 1564 | size = sizeof(struct kvm_msr_entry) * msrs.nmsrs; |
1565 | entries = vmalloc(size); | 1565 | entries = kmalloc(size, GFP_KERNEL); |
1566 | if (!entries) | 1566 | if (!entries) |
1567 | goto out; | 1567 | goto out; |
1568 | 1568 | ||
@@ -1581,7 +1581,7 @@ static int msr_io(struct kvm_vcpu *vcpu, struct kvm_msrs __user *user_msrs, | |||
1581 | r = n; | 1581 | r = n; |
1582 | 1582 | ||
1583 | out_free: | 1583 | out_free: |
1584 | vfree(entries); | 1584 | kfree(entries); |
1585 | out: | 1585 | out: |
1586 | return r; | 1586 | return r; |
1587 | } | 1587 | } |