From 64cbafeaa06b7a5c4bb31a7a13bbf049c5e5be88 Mon Sep 17 00:00:00 2001 From: wangmingrong Date: Mon, 29 Jan 2024 14:58:15 +0800 Subject: [PATCH] mm/kasan: Delete the lock when adding regions Signed-off-by: wangmingrong --- mm/kasan/kasan.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c index 971b5e5114..277323bad6 100644 --- a/mm/kasan/kasan.c +++ b/mm/kasan/kasan.c @@ -310,19 +310,15 @@ void kasan_unpoison(FAR const void *addr, size_t size) void kasan_register(FAR void *addr, FAR size_t *size) { FAR struct kasan_region_s *region; - int flags; region = (FAR struct kasan_region_s *) ((FAR char *)addr + *size - KASAN_REGION_SIZE(*size)); region->begin = (uintptr_t)addr; region->end = region->begin + *size; - - flags = spin_lock_irqsave(&g_lock); region->next = g_region; g_region = region; g_region_init = KASAN_INIT_VALUE; - spin_unlock_irqrestore(&g_lock, flags); kasan_poison(addr, *size); *size -= KASAN_REGION_SIZE(*size);