From: Daniel Vetter Date: Mon, 23 Mar 2020 14:49:00 +0000 (+0100) Subject: UPSTREAM: mm/sl[uo]b: export __kmalloc_track(_node)_caller X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0d9dd5c3221409df58dc612bacb7f12be26b319b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git UPSTREAM: mm/sl[uo]b: export __kmalloc_track(_node)_caller slab does this already, and I want to use this in a memory allocation tracker in drm for stuff that's tied to the lifetime of a drm_device, not the underlying struct device. Kinda like devres, but for drm. Acked-by: Andrew Morton Signed-off-by: Daniel Vetter Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrew Morton Cc: linux-mm@kvack.org Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-2-daniel.vetter@ffwll.ch (cherry picked from commit fd7cb5753ef49964ea9db5121c3fc9a4ec21ed8e) Bug: 163141236 Signed-off-by: Alistair Delva Change-Id: I10790befc779311a5f2ee441e4d073e51a5a7a62 --- diff --git a/mm/slob.c b/mm/slob.c index 10249160b693..df7dbe63e571 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -474,6 +474,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfp, unsigned long caller) { return __do_kmalloc_node(size, gfp, NUMA_NO_NODE, caller); } +EXPORT_SYMBOL(__kmalloc_track_caller); #ifdef CONFIG_NUMA void *__kmalloc_node_track_caller(size_t size, gfp_t gfp, @@ -481,6 +482,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfp, { return __do_kmalloc_node(size, gfp, node, caller); } +EXPORT_SYMBOL(__kmalloc_node_track_caller); #endif void kfree(const void *block) diff --git a/mm/slub.c b/mm/slub.c index db2639832037..347b6f1c35db 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4337,6 +4337,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfpflags, unsigned long caller) return ret; } +EXPORT_SYMBOL(__kmalloc_track_caller); #ifdef CONFIG_NUMA void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, @@ -4367,6 +4368,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, return ret; } +EXPORT_SYMBOL(__kmalloc_node_track_caller); #endif #ifdef CONFIG_SYSFS