未验证 提交 dd2f1a79 编写于 作者: S Shell 提交者: GitHub

[rt-smart] fix competition on aspace (#7064)

* [mm] mmu operations should be wrapped by _aspace_bst_insert & _aspace_bst_remove to avoid competition on page table

* [lwp] may not return null on failed
上级 c11f5bb2
......@@ -362,8 +362,12 @@ void *lwp_map_user_phy(struct rt_lwp *lwp, void *map_va, void *map_pa,
va = RT_NULL;
LOG_W("%s", __func__);
}
else
{
va += offset;
}
return va + offset;
return va;
}
rt_base_t lwp_brk(void *addr)
......
......@@ -75,12 +75,12 @@ static inline void _varea_uninstall(rt_varea_t varea)
rt_varea_free_pages(varea);
rt_hw_mmu_unmap(aspace, varea->start, varea->size);
rt_hw_tlb_invalidate_range(aspace, varea->start, varea->size, ARCH_PAGE_SIZE);
WR_LOCK(aspace);
_aspace_bst_remove(aspace, varea);
WR_UNLOCK(aspace);
rt_hw_mmu_unmap(aspace, varea->start, varea->size);
rt_hw_tlb_invalidate_range(aspace, varea->start, varea->size, ARCH_PAGE_SIZE);
}
int _init_lock(rt_aspace_t aspace)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册