From fe03ce5fbe4b0e7e1f37ba753573d1369d42ec25 Mon Sep 17 00:00:00 2001 From: ligd Date: Fri, 27 Oct 2023 16:21:35 +0800 Subject: [PATCH] mm: both use spin_lock_irqxx() when operated delaylist align with free_delaylist() Signed-off-by: ligd --- mm/mm_heap/mm_free.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/mm_heap/mm_free.c b/mm/mm_heap/mm_free.c index 4700aeeede..7716c720ce 100644 --- a/mm/mm_heap/mm_free.c +++ b/mm/mm_heap/mm_free.c @@ -45,12 +45,12 @@ static void add_delaylist(FAR struct mm_heap_s *heap, FAR void *mem) /* Delay the deallocation until a more appropriate time. */ - flags = enter_critical_section(); + flags = spin_lock_irqsave(NULL); tmp->flink = heap->mm_delaylist[up_cpu_index()]; heap->mm_delaylist[up_cpu_index()] = tmp; - leave_critical_section(flags); + spin_unlock_irqrestore(NULL, flags); #endif }