aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mempool.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mempool.c')
-rw-r--r--mm/mempool.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/mempool.c b/mm/mempool.c
index 7d8c5a0010a2..5c9dce34719b 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -103,10 +103,10 @@ static inline void poison_element(mempool_t *pool, void *element)
103} 103}
104#endif /* CONFIG_DEBUG_SLAB || CONFIG_SLUB_DEBUG_ON */ 104#endif /* CONFIG_DEBUG_SLAB || CONFIG_SLUB_DEBUG_ON */
105 105
106static void kasan_poison_element(mempool_t *pool, void *element) 106static __always_inline void kasan_poison_element(mempool_t *pool, void *element)
107{ 107{
108 if (pool->alloc == mempool_alloc_slab || pool->alloc == mempool_kmalloc) 108 if (pool->alloc == mempool_alloc_slab || pool->alloc == mempool_kmalloc)
109 kasan_poison_kfree(element); 109 kasan_poison_kfree(element, _RET_IP_);
110 if (pool->alloc == mempool_alloc_pages) 110 if (pool->alloc == mempool_alloc_pages)
111 kasan_free_pages(element, (unsigned long)pool->pool_data); 111 kasan_free_pages(element, (unsigned long)pool->pool_data);
112} 112}
@@ -119,7 +119,7 @@ static void kasan_unpoison_element(mempool_t *pool, void *element, gfp_t flags)
119 kasan_alloc_pages(element, (unsigned long)pool->pool_data); 119 kasan_alloc_pages(element, (unsigned long)pool->pool_data);
120} 120}
121 121
122static void add_element(mempool_t *pool, void *element) 122static __always_inline void add_element(mempool_t *pool, void *element)
123{ 123{
124 BUG_ON(pool->curr_nr >= pool->min_nr); 124 BUG_ON(pool->curr_nr >= pool->min_nr);
125 poison_element(pool, element); 125 poison_element(pool, element);