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:
Bahadir Balban
2009-05-12 18:24:31 +03:00
parent 33fcceb2b6
commit 44bf1db573

View File

@@ -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);