mm: add kasan_unregister implementaion

In mm_uninitialize should unregister kasan

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai
2024-04-22 18:06:51 +08:00
committed by Xiang Xiao
parent 1771d233c9
commit 5ee7c563a5
4 changed files with 60 additions and 0 deletions
+7
View File
@@ -1416,10 +1416,17 @@ FAR void *mm_realloc(FAR struct mm_heap_s *heap, FAR void *oldmem,
void mm_uninitialize(FAR struct mm_heap_s *heap)
{
int i;
#ifdef CONFIG_MM_HEAP_MEMPOOL
mempool_multiple_deinit(heap->mm_mpool);
#endif
for (i = 0; i < CONFIG_MM_REGIONS; i++)
{
kasan_unregister(heap->mm_heapstart[i]);
}
#if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_MEMINFO)
# if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
procfs_unregister_meminfo(&heap->mm_procfs);