From f2467ee0698e0fb98d94ed3f11d3e0c19c4228d4 Mon Sep 17 00:00:00 2001 From: Michael S. Tsirkin Date: Wed, 25 Jul 2018 16:38:31 +0300 Subject: tools/virtio: add kmalloc_array stub Fixes: 6da2ec56059 ("treewide: kmalloc() -> kmalloc_array()") Signed-off-by: Michael S. Tsirkin --- tools/virtio/linux/kernel.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h index fca8381bbe04..fb22bccfbc8a 100644 --- a/tools/virtio/linux/kernel.h +++ b/tools/virtio/linux/kernel.h @@ -52,6 +52,11 @@ static inline void *kmalloc(size_t s, gfp_t gfp) return __kmalloc_fake; return malloc(s); } +static inline void *kmalloc_array(unsigned n, size_t s, gfp_t gfp) +{ + return kmalloc(n * s, gfp); +} + static inline void *kzalloc(size_t s, gfp_t gfp) { void *p = kmalloc(s, gfp); -- cgit v1.2.3