Skip to content

Commit f2467ee

Browse files
committed
tools/virtio: add kmalloc_array stub
Fixes: 6da2ec5 ("treewide: kmalloc() -> kmalloc_array()") Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 8129e2a commit f2467ee

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/virtio/linux/kernel.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ static inline void *kmalloc(size_t s, gfp_t gfp)
5252
return __kmalloc_fake;
5353
return malloc(s);
5454
}
55+
static inline void *kmalloc_array(unsigned n, size_t s, gfp_t gfp)
56+
{
57+
return kmalloc(n * s, gfp);
58+
}
59+
5560
static inline void *kzalloc(size_t s, gfp_t gfp)
5661
{
5762
void *p = kmalloc(s, gfp);

0 commit comments

Comments
 (0)