VM: add "vm_munmap()" helper function
Like the vm_brk() function, this is the same as "do_munmap()", except it does the VM locking for the caller. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
@@ -566,15 +566,10 @@ out:
|
||||
|
||||
SYSCALL_DEFINE2(64_munmap, unsigned long, addr, size_t, len)
|
||||
{
|
||||
long ret;
|
||||
|
||||
if (invalid_64bit_range(addr, len))
|
||||
return -EINVAL;
|
||||
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
ret = do_munmap(current->mm, addr, len);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
return ret;
|
||||
return vm_munmap(current->mm, addr, len);
|
||||
}
|
||||
|
||||
extern unsigned long do_mremap(unsigned long addr,
|
||||
|
Reference in New Issue
Block a user