Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3e14aa3 authored by Xiaotian Feng's avatar Xiaotian Feng Committed by Pekka Enberg
Browse files

slub: __kmalloc_node_track_caller should trace kmalloc_large_node case



commit 94b528d0 (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: default avatarDavid 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: default avatarXiaotian Feng <dfeng@redhat.com>
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
parent bbd7d57b
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -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);