mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 10:53:16 +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)
|
||||
return ret;
|
||||
|
||||
/* Unmap the whole vma address range */
|
||||
BUG_ON(l4_unmap((void *)__pfn_to_addr(vma->pfn_start),
|
||||
vma->pfn_end - vma->pfn_start, task->tid) < 0);
|
||||
/*
|
||||
* Unmap the whole vma address range. Note that this
|
||||
* 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 */
|
||||
list_del(&vma->list);
|
||||
|
||||
Reference in New Issue
Block a user