diff options
| author | Shell <[email protected]> | 2023-03-19 14:41:50 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-03-19 14:41:50 +0800 |
| commit | dd2f1a795af0674f0d2f2c23df721fb8decbafb8 (patch) | |
| tree | 322b7c0b46732d25274e7f3f982478ef4881214d /components/mm | |
| parent | c11f5bb2510c9c961819c554c1e4cc69f7f52ab7 (diff) | |
[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
Diffstat (limited to 'components/mm')
| -rw-r--r-- | components/mm/mm_aspace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/mm/mm_aspace.c b/components/mm/mm_aspace.c index b42cdfb5a4..e171af15d5 100644 --- a/components/mm/mm_aspace.c +++ b/components/mm/mm_aspace.c @@ -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) |
