The call path __do_kmalloc_node() -> __kmalloc_large_node_noprof() results in duplicate trace_kmalloc() calls. Since __kmalloc_large_node_noprof() is a thin wrapper around ___kmalloc_large_node(), call ___kmalloc_large_node() directly instead. This skips the trace_kmalloc() in __kmalloc_large_node_noprof() and eliminates the duplication. Fixes: a0a44d9175b3 ("mm, slab: don't wrap internal functions with alloc_hooks()") Signed-off-by: Hao Li --- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/slub.c b/mm/slub.c index 5c33d1247060..5399f636be9f 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -5516,7 +5516,7 @@ void *__do_kmalloc_node(kmem_buckets *b, gfp_t flags, int node, void *ret; if (unlikely(size > KMALLOC_MAX_CACHE_SIZE)) { - ret = __kmalloc_large_node_noprof(size, flags, node); + ret = ___kmalloc_large_node(size, flags, node); trace_kmalloc(ac->caller_addr, ret, size, PAGE_SIZE << get_order(size), flags, node); return ret; -- 2.56.1