move security_mmap_addr() to saner place

it really should be done by get_unmapped_area(); that cuts down on
the amount of callers considerably and it's the right place for
that stuff anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2012-05-30 17:13:15 -04:00
parent 8b3ec6814c
commit 9ac4ed4bd0
2 changed files with 3 additions and 21 deletions

View File

@@ -371,10 +371,6 @@ static unsigned long mremap_to(unsigned long addr,
if ((addr <= new_addr) && (addr+old_len) > new_addr)
goto out;
ret = security_mmap_addr(new_addr);
if (ret)
goto out;
ret = do_munmap(mm, new_addr, new_len);
if (ret)
goto out;
@@ -532,9 +528,6 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
goto out;
}
ret = security_mmap_addr(new_addr);
if (ret)
goto out;
ret = move_vma(vma, addr, old_len, new_len, new_addr);
}
out: