mirror of
https://github.com/drasko/codezero.git
synced 2026-03-02 10:33:15 +01:00
Removed the BUG() check on a legitimate l4_unmap return case
When vmas are unmapped before being touched, l4_unmap may return a negative value if the unmapped area was already faulted. This is normal behaviour
This commit is contained in:
@@ -93,9 +93,13 @@ int vma_destroy_single(struct tcb *task, struct vm_area *vma)
|
|||||||
if ((ret = vma_drop_merge_delete_all(vma)) < 0)
|
if ((ret = vma_drop_merge_delete_all(vma)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* Unmap the whole vma address range */
|
/*
|
||||||
BUG_ON(l4_unmap((void *)__pfn_to_addr(vma->pfn_start),
|
* Unmap the whole vma address range. Note that this
|
||||||
vma->pfn_end - vma->pfn_start, task->tid) < 0);
|
* may return -1 if the area was already faulted, which
|
||||||
|
* means the area was unmapped before being touched.
|
||||||
|
*/
|
||||||
|
l4_unmap((void *)__pfn_to_addr(vma->pfn_start),
|
||||||
|
vma->pfn_end - vma->pfn_start, task->tid);
|
||||||
|
|
||||||
/* Unlink and delete vma */
|
/* Unlink and delete vma */
|
||||||
list_del(&vma->list);
|
list_del(&vma->list);
|
||||||
|
|||||||
Reference in New Issue
Block a user