]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - mm/mempool.c
Merge tags 'cris-for-4.16' and 'cris-for-4.16-urgent' of git://git.kernel.org/pub...
[linux.git] / mm / mempool.c
index 7d8c5a0010a2d0c9e5b006ce4e961777c127ac6e..5c9dce34719b385c9f5ff325e31b30c944fae83d 100644 (file)
@@ -103,10 +103,10 @@ static inline void poison_element(mempool_t *pool, void *element)
 }
 #endif /* CONFIG_DEBUG_SLAB || CONFIG_SLUB_DEBUG_ON */
 
-static void kasan_poison_element(mempool_t *pool, void *element)
+static __always_inline void kasan_poison_element(mempool_t *pool, void *element)
 {
        if (pool->alloc == mempool_alloc_slab || pool->alloc == mempool_kmalloc)
-               kasan_poison_kfree(element);
+               kasan_poison_kfree(element, _RET_IP_);
        if (pool->alloc == mempool_alloc_pages)
                kasan_free_pages(element, (unsigned long)pool->pool_data);
 }
@@ -119,7 +119,7 @@ static void kasan_unpoison_element(mempool_t *pool, void *element, gfp_t flags)
                kasan_alloc_pages(element, (unsigned long)pool->pool_data);
 }
 
-static void add_element(mempool_t *pool, void *element)
+static __always_inline void add_element(mempool_t *pool, void *element)
 {
        BUG_ON(pool->curr_nr >= pool->min_nr);
        poison_element(pool, element);