aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/slab.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/slab.h')
-rw-r--r--include/linux/slab.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h
index ed2ffaab59ea..76f1feeabd38 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -104,6 +104,7 @@
104 (unsigned long)ZERO_SIZE_PTR) 104 (unsigned long)ZERO_SIZE_PTR)
105 105
106#include <linux/kmemleak.h> 106#include <linux/kmemleak.h>
107#include <linux/kasan.h>
107 108
108struct mem_cgroup; 109struct mem_cgroup;
109/* 110/*
@@ -325,7 +326,10 @@ kmem_cache_alloc_node_trace(struct kmem_cache *s,
325static __always_inline void *kmem_cache_alloc_trace(struct kmem_cache *s, 326static __always_inline void *kmem_cache_alloc_trace(struct kmem_cache *s,
326 gfp_t flags, size_t size) 327 gfp_t flags, size_t size)
327{ 328{
328 return kmem_cache_alloc(s, flags); 329 void *ret = kmem_cache_alloc(s, flags);
330
331 kasan_kmalloc(s, ret, size);
332 return ret;
329} 333}
330 334
331static __always_inline void * 335static __always_inline void *
@@ -333,7 +337,10 @@ kmem_cache_alloc_node_trace(struct kmem_cache *s,
333 gfp_t gfpflags, 337 gfp_t gfpflags,
334 int node, size_t size) 338 int node, size_t size)
335{ 339{
336 return kmem_cache_alloc_node(s, gfpflags, node); 340 void *ret = kmem_cache_alloc_node(s, gfpflags, node);
341
342 kasan_kmalloc(s, ret, size);
343 return ret;
337} 344}
338#endif /* CONFIG_TRACING */ 345#endif /* CONFIG_TRACING */
339 346