mm: don't do mm_checkcorruption in IRQ

because this not safe in SMP mode

Change-Id: Ifaf49818c51ee4283f0e280ae3e4e23cbd0dba08
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2021-06-01 15:30:14 +08:00 committed by Xiang Xiao
parent 68d66148ad
commit 6685df498f

View File

@ -74,14 +74,7 @@ void mm_checkcorruption(FAR struct mm_heap_s *heap)
if (up_interrupt_context())
{
if (heap_impl->mm_counts_held)
{
#if CONFIG_MM_REGIONS > 1
continue;
#else
return;
#endif
}
return;
}
else if (sched_idletask())
{
@ -125,9 +118,6 @@ void mm_checkcorruption(FAR struct mm_heap_s *heap)
assert(node == heap_impl->mm_heapend[region]);
if (!up_interrupt_context())
{
mm_givesemaphore(heap);
}
mm_givesemaphore(heap);
}
}