KVM: Use kmemdup() instead of kmalloc/memcpy
authorSasha Levin <levinsasha928@gmail.com>
Sun, 4 Dec 2011 17:36:28 +0000 (19:36 +0200)
committerAvi Kivity <avi@redhat.com>
Tue, 27 Dec 2011 09:22:20 +0000 (11:22 +0200)
commitcdfca7b346e6dbab1ba33260c28ccb8333485a5b
tree423d4487ee5604a69943e8daade01fbec1879ef6
parent3f745f1e224e05e845a15760a55f3fd323f7a753
KVM: Use kmemdup() instead of kmalloc/memcpy

Switch to kmemdup() in two places to shorten the code and avoid possible bugs.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86.c
virt/kvm/kvm_main.c