fixes wrong return value of page_map(), fixes #2y
This commit is contained in:
parent
0192f70338
commit
90937daeb5
1 changed files with 7 additions and 3 deletions
|
@ -129,6 +129,7 @@ int page_map(size_t viraddr, size_t phyaddr, size_t npages, size_t bits)
|
|||
}
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
out:
|
||||
if (bits & PG_USER)
|
||||
spinlock_irqsave_unlock(¤t_task->page_lock);
|
||||
|
@ -155,6 +156,7 @@ int page_unmap(size_t viraddr, size_t npages)
|
|||
spinlock_irqsave_unlock(¤t_task->page_lock);
|
||||
spinlock_unlock(&kslock);
|
||||
|
||||
/* This can't fail because we don't make checks here */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -180,6 +182,7 @@ int page_map_drop()
|
|||
|
||||
spinlock_irqsave_unlock(¤t_task->page_lock);
|
||||
|
||||
/* This can't fail because we don't make checks here */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -224,7 +227,8 @@ int page_map_copy(task_t *dest)
|
|||
self [PAGE_LEVELS-1][PAGE_MAP_ENTRIES-2] = 0;
|
||||
spinlock_irqsave_unlock(¤t_task->page_lock);
|
||||
|
||||
flush_tlb(); /* Flush TLB entries of 'other' self-reference */
|
||||
/* Flush TLB entries of 'other' self-reference */
|
||||
flush_tlb();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue