diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-30 17:13:15 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-01 10:37:16 -0400 |
commit | 9ac4ed4bd0adec75db13a4b08a39a3918ec0e3c9 (patch) | |
tree | 23aba68ec121692cd6f0449535524b6586e8914f /mm/mremap.c | |
parent | 8b3ec6814c83d76b85bd13badc48552836c24839 (diff) |
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>
Diffstat (limited to 'mm/mremap.c')
-rw-r--r-- | mm/mremap.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/mm/mremap.c b/mm/mremap.c index ebf10892b63d..21fed202ddad 100644 --- a/mm/mremap.c +++ b/mm/mremap.c | |||
@@ -371,10 +371,6 @@ static unsigned long mremap_to(unsigned long addr, | |||
371 | if ((addr <= new_addr) && (addr+old_len) > new_addr) | 371 | if ((addr <= new_addr) && (addr+old_len) > new_addr) |
372 | goto out; | 372 | goto out; |
373 | 373 | ||
374 | ret = security_mmap_addr(new_addr); | ||
375 | if (ret) | ||
376 | goto out; | ||
377 | |||
378 | ret = do_munmap(mm, new_addr, new_len); | 374 | ret = do_munmap(mm, new_addr, new_len); |
379 | if (ret) | 375 | if (ret) |
380 | goto out; | 376 | goto out; |
@@ -532,9 +528,6 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len, | |||
532 | goto out; | 528 | goto out; |
533 | } | 529 | } |
534 | 530 | ||
535 | ret = security_mmap_addr(new_addr); | ||
536 | if (ret) | ||
537 | goto out; | ||
538 | ret = move_vma(vma, addr, old_len, new_len, new_addr); | 531 | ret = move_vma(vma, addr, old_len, new_len, new_addr); |
539 | } | 532 | } |
540 | out: | 533 | out: |