split cap_mmap_addr() out of cap_file_mmap()

... switch callers.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2012-05-30 13:11:37 -04:00
parent cf74d14c4f
commit d007794a18
5 changed files with 29 additions and 14 deletions

View File

@@ -3104,7 +3104,7 @@ static int selinux_file_mmap(struct file *file, unsigned long reqprot,
}
/* do DAC check on address space usage */
rc = cap_file_mmap(file, reqprot, prot, flags, addr, addr_only);
rc = cap_mmap_addr(addr);
if (rc || addr_only)
return rc;