bugfix: 修复对vma是否已经存在的判断的bug

This commit is contained in:
fslongjin 2022-08-19 21:53:47 +08:00
parent 4950d43e65
commit 7378e8bab8

View File

@ -123,7 +123,7 @@ int vma_insert(struct mm_struct *mm, struct vm_area_struct *vma)
struct vm_area_struct *prev;
prev = vma_find(mm, vma->vm_start);
if (prev && prev->vm_start == vma->vm_start && prev->vm_end == vma->vm_end)
if (prev && prev->vm_start <= vma->vm_start && prev->vm_end >= vma->vm_end)
{
// 已经存在了相同的vma
return -EEXIST;