summaryrefslogtreecommitdiffstats
path: root/tools/virtio
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2018-07-25 16:38:31 +0300
committerMichael S. Tsirkin <mst@redhat.com>2018-07-27 16:54:40 +0300
commitf2467ee0698e0fb98d94ed3f11d3e0c19c4228d4 (patch)
tree1b857222131761a981269dc08f0184397484fd64 /tools/virtio
parent8129e2a1cb39bf0df12cc13c9dc7bb581296bd7b (diff)
downloadtalos-op-linux-f2467ee0698e0fb98d94ed3f11d3e0c19c4228d4.tar.gz
talos-op-linux-f2467ee0698e0fb98d94ed3f11d3e0c19c4228d4.zip
tools/virtio: add kmalloc_array stub
Fixes: 6da2ec56059 ("treewide: kmalloc() -> kmalloc_array()") Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tools/virtio')
-rw-r--r--tools/virtio/linux/kernel.h5
1 files changed, 5 insertions, 0 deletions
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);
OpenPOWER on IntegriCloud