diff options
Diffstat (limited to '')
-rw-r--r-- | security/security.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/security/security.c b/security/security.c index fc1410550..21c27424a 100644 --- a/security/security.c +++ b/security/security.c @@ -926,12 +926,13 @@ static inline unsigned long mmap_prot(struct file *file, unsigned long prot) int security_mmap_file(struct file *file, unsigned long prot, unsigned long flags) { + unsigned long prot_adj = mmap_prot(file, prot); int ret; - ret = call_int_hook(mmap_file, 0, file, prot, - mmap_prot(file, prot), flags); + + ret = call_int_hook(mmap_file, 0, file, prot, prot_adj, flags); if (ret) return ret; - return ima_file_mmap(file, prot); + return ima_file_mmap(file, prot, prot_adj, flags); } int security_mmap_addr(unsigned long addr) |