mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
UPSTREAM: 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.com
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Acked-by: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Bug: 64145065
(cherry-picked from f7376aed6c)
Change-Id: I9c8ae37791ab10c746414322a672bdf0ebd1ed9f
Signed-off-by: Paul Lawrence <paullawrence@google.com>
This commit is contained in:
committed by
Amit Pundir
parent
d03c2b3be0
commit
362ec928f5
@@ -147,10 +147,14 @@ static void qlink_free(struct qlist_node *qlink, struct kmem_cache *cache)
|
||||
struct kasan_alloc_meta *alloc_info = get_alloc_info(cache, object);
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
if (IS_ENABLED(CONFIG_SLAB))
|
||||
local_irq_save(flags);
|
||||
|
||||
alloc_info->state = KASAN_STATE_FREE;
|
||||
___cache_free(cache, object, _THIS_IP_);
|
||||
local_irq_restore(flags);
|
||||
|
||||
if (IS_ENABLED(CONFIG_SLAB))
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
static void qlist_free_all(struct qlist_head *q, struct kmem_cache *cache)
|
||||
|
||||
Reference in New Issue
Block a user