[kernel][vm] Fix a bug in vm address allocator
Pass arch_mmu_flags (instead of flags) to arch_mmu_pick_spot routine. This bug would mostly affect ARMv7 platforms with enabled support for non-secure memory. Change-Id: Ic97ee6d3f05528170d66ab5033b24adf1d0c514e
This commit is contained in:
committed by
Travis Geiselbrecht
parent
42705b9f0e
commit
18192509eb
@@ -204,8 +204,8 @@ static inline bool check_gap(vmm_aspace_t *aspace,
|
|||||||
gap_end = aspace->base + aspace->size - 1;
|
gap_end = aspace->base + aspace->size - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
*pva = arch_mmu_pick_spot(gap_beg, prev ? prev->flags : ARCH_MMU_FLAG_INVALID,
|
*pva = arch_mmu_pick_spot(gap_beg, prev ? prev->arch_mmu_flags : ARCH_MMU_FLAG_INVALID,
|
||||||
gap_end, next ? next->flags : ARCH_MMU_FLAG_INVALID,
|
gap_end, next ? next->arch_mmu_flags : ARCH_MMU_FLAG_INVALID,
|
||||||
align, size, arch_mmu_flags);
|
align, size, arch_mmu_flags);
|
||||||
if (*pva < gap_beg)
|
if (*pva < gap_beg)
|
||||||
goto not_found; /* address wrapped around */
|
goto not_found; /* address wrapped around */
|
||||||
|
|||||||
Reference in New Issue
Block a user