From: Xiaotian Feng Date: Thu, 8 Apr 2010 09:26:44 +0000 (+0800) Subject: slub: __kmalloc_node_track_caller should trace kmalloc_large_node case X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d3e14aa336b37df76ae875fa051dfdb0e765ddf9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git slub: __kmalloc_node_track_caller should trace kmalloc_large_node case commit 94b528d (kmemtrace: SLUB hooks for caller-tracking functions) missed tracing kmalloc_large_node in __kmalloc_node_track_caller. We should trace it same as __kmalloc_node. Acked-by: David Rientjes Cc: Matt Mackall Cc: Ingo Molnar Cc: Vegard Nossum Signed-off-by: Xiaotian Feng Signed-off-by: Pekka Enberg --- diff --git a/mm/slub.c b/mm/slub.c index 78f1a202ca33..52ae5a538180 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3341,8 +3341,15 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, struct kmem_cache *s; void *ret; - if (unlikely(size > SLUB_MAX_SIZE)) - return kmalloc_large_node(size, gfpflags, node); + if (unlikely(size > SLUB_MAX_SIZE)) { + ret = kmalloc_large_node(size, gfpflags, node); + + trace_kmalloc_node(caller, ret, + size, PAGE_SIZE << get_order(size), + gfpflags, node); + + return ret; + } s = get_slab(size, gfpflags);