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>
This commit is contained in:
@@ -1047,7 +1047,10 @@ static int validate_mmap_request(struct file *file,
|
||||
}
|
||||
|
||||
/* allow the security API to have its say */
|
||||
ret = security_file_mmap(file, reqprot, prot, flags, addr, 0);
|
||||
ret = security_mmap_addr(addr);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
ret = security_mmap_file(file, reqprot, prot, flags);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
Reference in New Issue
Block a user