mirror of
https://github.com/drasko/codezero.git
synced 2026-01-27 10:13:15 +01:00
Mapping precision fixes on l4_unmap and do_munmap()
l4_unmap now returns -1 if given range was only partially unmapped. do_munmap() now only unmaps address ranges that have correspondence in the unmapped vmas. Trying to unmap regions with no correspondent vmas causes problems in corner cases, e.g. mm0 that tries to mmap its own address space during initialisation would unmap its whole address space and fail to execute.
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
struct vm_area *vma_new(unsigned long pfn_start, unsigned long npages,
|
||||
unsigned int flags, unsigned long file_offset);
|
||||
|
||||
int do_munmap(struct tcb *task, void *vaddr, unsigned long size);
|
||||
int do_munmap(struct tcb *task, unsigned long vaddr, unsigned long size);
|
||||
|
||||
void *do_mmap(struct vm_file *mapfile, unsigned long f_offset, struct tcb *t,
|
||||
unsigned long map_address, unsigned int flags, unsigned int pages);
|
||||
|
||||
Reference in New Issue
Block a user