Commit f7376aed authored by Andrey Ryabinin's avatar Andrey Ryabinin Committed by Linus Torvalds

mm/kasan, slub: don't disable interrupts when object leaves quarantine

SLUB doesn't require disabled interrupts to call ___cache_free().

Link: http://lkml.kernel.org/r/1470062715-14077-3-git-send-email-aryabinin@virtuozzo.comSigned-off-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
Acked-by: default avatarAlexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4b3ec5a3
...@@ -147,9 +147,13 @@ static void qlink_free(struct qlist_node *qlink, struct kmem_cache *cache) ...@@ -147,9 +147,13 @@ static void qlink_free(struct qlist_node *qlink, struct kmem_cache *cache)
struct kasan_alloc_meta *alloc_info = get_alloc_info(cache, object); struct kasan_alloc_meta *alloc_info = get_alloc_info(cache, object);
unsigned long flags; unsigned long flags;
if (IS_ENABLED(CONFIG_SLAB))
local_irq_save(flags); local_irq_save(flags);
alloc_info->state = KASAN_STATE_FREE; alloc_info->state = KASAN_STATE_FREE;
___cache_free(cache, object, _THIS_IP_); ___cache_free(cache, object, _THIS_IP_);
if (IS_ENABLED(CONFIG_SLAB))
local_irq_restore(flags); local_irq_restore(flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment