aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mremap.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-05-30 13:30:51 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-05-31 13:11:54 -0400
commite5467859f7f79b69fc49004403009dfdba3bec53 (patch)
tree73b011daf79eeddd61bbcaf65cd197b5e5f6f149 /mm/mremap.c
parentd007794a182bc072a7b7479909dbd0d67ba341be (diff)
split ->file_mmap() into ->mmap_addr()/->mmap_file()
... i.e. file-dependent and address-dependent checks. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'mm/mremap.c')
-rw-r--r--mm/mremap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/mremap.c b/mm/mremap.c
index 169c53b87749..ebf10892b63d 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -371,7 +371,7 @@ 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_file_mmap(NULL, 0, 0, 0, new_addr, 1); 374 ret = security_mmap_addr(new_addr);
375 if (ret) 375 if (ret)
376 goto out; 376 goto out;
377 377
@@ -532,7 +532,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
532 goto out; 532 goto out;
533 } 533 }
534 534
535 ret = security_file_mmap(NULL, 0, 0, 0, new_addr, 1); 535 ret = security_mmap_addr(new_addr);
536 if (ret) 536 if (ret)
537 goto out; 537 goto out;
538 ret = move_vma(vma, addr, old_len, new_len, new_addr); 538 ret = move_vma(vma, addr, old_len, new_len, new_addr);