]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
slub: __kmalloc_node_track_caller should trace kmalloc_large_node case
authorXiaotian Feng <dfeng@redhat.com>
Thu, 8 Apr 2010 09:26:44 +0000 (17:26 +0800)
committerPekka Enberg <penberg@cs.helsinki.fi>
Sat, 22 May 2010 07:57:31 +0000 (10:57 +0300)
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 <rientjes@google.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
mm/slub.c

index 78f1a202ca331faa240411ae45bf769841743891..52ae5a53818053b61241062023ba1951f426329a 100644 (file)
--- 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);