From: Ye Bin <yebin10@xxxxxxxxxx> If 'n' or 'size' isn't builtin constant just call __kmalloc_noprof() in kmalloc_array_noprof(). Fixes: 7bd230a26648 ("mm/slab: enable slab allocation tagging for kmalloc and friends") Signed-off-by: Ye Bin <yebin10@xxxxxxxxxx> --- include/linux/slab.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/slab.h b/include/linux/slab.h index 3b03b31831a9..0edb8363fc4f 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -947,7 +947,7 @@ static inline __alloc_size(1, 2) void *kmalloc_array_noprof(size_t n, size_t siz return NULL; if (__builtin_constant_p(n) && __builtin_constant_p(size)) return kmalloc_noprof(bytes, flags); - return kmalloc_noprof(bytes, flags); + return __kmalloc_noprof(bytes, flags); } #define kmalloc_array(...) alloc_hooks(kmalloc_array_noprof(__VA_ARGS__)) -- 2.34.1