]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mm/slab_common: Restore passing "caller" for tracing
authorKees Cook <keescook@chromium.org>
Sat, 5 Nov 2022 06:35:34 +0000 (23:35 -0700)
committerVlastimil Babka <vbabka@suse.cz>
Sun, 6 Nov 2022 20:20:46 +0000 (21:20 +0100)
The "caller" argument was accidentally being ignored in a few places
that were recently refactored. Restore these "caller" arguments, instead
of _RET_IP_.

Fixes: 11e9734bcb6a ("mm/slab_common: unify NUMA and UMA version of tracepoints")
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: linux-mm@kvack.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
mm/slab_common.c

index 206e59051c1d64b09036c61b5763c0fd00e0ee8c..fa784563e1edb6f4eadf35d9228d1fa7f780361c 100644 (file)
@@ -941,7 +941,7 @@ void *__do_kmalloc_node(size_t size, gfp_t flags, int node, unsigned long caller
 
        if (unlikely(size > KMALLOC_MAX_CACHE_SIZE)) {
                ret = __kmalloc_large_node(size, flags, node);
-               trace_kmalloc(_RET_IP_, ret, size,
+               trace_kmalloc(caller, ret, size,
                              PAGE_SIZE << get_order(size), flags, node);
                return ret;
        }
@@ -953,7 +953,7 @@ void *__do_kmalloc_node(size_t size, gfp_t flags, int node, unsigned long caller
 
        ret = __kmem_cache_alloc_node(s, flags, node, size, caller);
        ret = kasan_kmalloc(s, ret, size, flags);
-       trace_kmalloc(_RET_IP_, ret, size, s->size, flags, node);
+       trace_kmalloc(caller, ret, size, s->size, flags, node);
        return ret;
 }