diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-08-01 12:34:01 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-08-01 12:34:01 -0500 |
commit | 9454c23852ca6d7aec89fd6fd46a046c323caac3 (patch) | |
tree | 794be65345027b5adea3720a43124fee338333a5 /mm/mempool.c | |
parent | a04bee8285a71cdbb9076c3dc38be1f0b9a6b4b3 (diff) | |
parent | 4ef33685aa0957d771e068b60a5f3ca6b47ade1c (diff) | |
download | linux-9454c23852ca6d7aec89fd6fd46a046c323caac3.tar.gz linux-9454c23852ca6d7aec89fd6fd46a046c323caac3.tar.bz2 linux-9454c23852ca6d7aec89fd6fd46a046c323caac3.zip |
Merge branch 'pci/msi-affinity' into next
Conflicts:
drivers/nvme/host/pci.c
Diffstat (limited to 'mm/mempool.c')
-rw-r--r-- | mm/mempool.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/mm/mempool.c b/mm/mempool.c index 9e075f829d0d..8f65464da5de 100644 --- a/mm/mempool.c +++ b/mm/mempool.c @@ -104,20 +104,16 @@ static inline void poison_element(mempool_t *pool, void *element) static void kasan_poison_element(mempool_t *pool, void *element) { - if (pool->alloc == mempool_alloc_slab) - kasan_poison_slab_free(pool->pool_data, element); - if (pool->alloc == mempool_kmalloc) - kasan_kfree(element); + if (pool->alloc == mempool_alloc_slab || pool->alloc == mempool_kmalloc) + kasan_poison_kfree(element); if (pool->alloc == mempool_alloc_pages) kasan_free_pages(element, (unsigned long)pool->pool_data); } static void kasan_unpoison_element(mempool_t *pool, void *element, gfp_t flags) { - if (pool->alloc == mempool_alloc_slab) - kasan_slab_alloc(pool->pool_data, element, flags); - if (pool->alloc == mempool_kmalloc) - kasan_krealloc(element, (size_t)pool->pool_data, flags); + if (pool->alloc == mempool_alloc_slab || pool->alloc == mempool_kmalloc) + kasan_unpoison_slab(element); if (pool->alloc == mempool_alloc_pages) kasan_alloc_pages(element, (unsigned long)pool->pool_data); } |