diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-30 13:30:51 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-31 13:11:54 -0400 |
commit | e5467859f7f79b69fc49004403009dfdba3bec53 (patch) | |
tree | 73b011daf79eeddd61bbcaf65cd197b5e5f6f149 /mm/nommu.c | |
parent | d007794a182bc072a7b7479909dbd0d67ba341be (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/nommu.c')
-rw-r--r-- | mm/nommu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/nommu.c b/mm/nommu.c index de6084e3a046..acfe419785db 100644 --- a/mm/nommu.c +++ b/mm/nommu.c | |||
@@ -1047,7 +1047,10 @@ static int validate_mmap_request(struct file *file, | |||
1047 | } | 1047 | } |
1048 | 1048 | ||
1049 | /* allow the security API to have its say */ | 1049 | /* allow the security API to have its say */ |
1050 | ret = security_file_mmap(file, reqprot, prot, flags, addr, 0); | 1050 | ret = security_mmap_addr(addr); |
1051 | if (ret < 0) | ||
1052 | return ret; | ||
1053 | ret = security_mmap_file(file, reqprot, prot, flags); | ||
1051 | if (ret < 0) | 1054 | if (ret < 0) |
1052 | return ret; | 1055 | return ret; |
1053 | 1056 | ||