mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-12 02:50:14 -05:00
tools/virtio: add kmalloc_array stub
Fixes: 6da2ec5605 ("treewide: kmalloc() -> kmalloc_array()")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user