Re: [PATCH 05/49] arch/x86: Use vzalloc

From: Takuya Yoshikawa
Date: Fri Nov 05 2010 - 00:21:01 EST


(2010/11/05 12:07), Joe Perches wrote:

> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 2288ad8..624d4da 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -3174,10 +3174,9 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm,
> spin_unlock(&kvm->mmu_lock);
>
> r = -ENOMEM;
> - dirty_bitmap = vmalloc(n);
> + dirty_bitmap = vzalloc(n);

This vmalloc() does not exist already, see kvm.git.

Takuya

> if (!dirty_bitmap)
> goto out;
> - memset(dirty_bitmap, 0, n);
>
> r = -ENOMEM;
> slots = kzalloc(sizeof(struct kvm_memslots), GFP_KERNEL);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/