summaryrefslogtreecommitdiffstats
path: root/include/linux/slab.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/slab.h')
-rw-r--r--include/linux/slab.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 1fb77a9..8cf5293 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -76,7 +76,14 @@ struct cache_sizes {
kmem_cache_t *cs_dmacachep;
};
extern struct cache_sizes malloc_sizes[];
+
+#ifndef CONFIG_DEBUG_SLAB
extern void *__kmalloc(size_t, gfp_t);
+#else
+extern void *__kmalloc_track_caller(size_t, gfp_t, void*);
+#define __kmalloc(size, flags) \
+ __kmalloc_track_caller(size, flags, __builtin_return_address(0))
+#endif
static inline void *kmalloc(size_t size, gfp_t flags)
{
OpenPOWER on IntegriCloud