aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/selinux/hooks.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 08b506846a1f..2c98071fba8b 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -3056,18 +3056,13 @@ static int selinux_file_mprotect(struct vm_area_struct *vma,
3056 unsigned long prot) 3056 unsigned long prot)
3057{ 3057{
3058 const struct cred *cred = current_cred(); 3058 const struct cred *cred = current_cred();
3059 int rc;
3060
3061 rc = secondary_ops->file_mprotect(vma, reqprot, prot);
3062 if (rc)
3063 return rc;
3064 3059
3065 if (selinux_checkreqprot) 3060 if (selinux_checkreqprot)
3066 prot = reqprot; 3061 prot = reqprot;
3067 3062
3068#ifndef CONFIG_PPC32 3063#ifndef CONFIG_PPC32
3069 if ((prot & PROT_EXEC) && !(vma->vm_flags & VM_EXEC)) { 3064 if ((prot & PROT_EXEC) && !(vma->vm_flags & VM_EXEC)) {
3070 rc = 0; 3065 int rc = 0;
3071 if (vma->vm_start >= vma->vm_mm->start_brk && 3066 if (vma->vm_start >= vma->vm_mm->start_brk &&
3072 vma->vm_end <= vma->vm_mm->brk) { 3067 vma->vm_end <= vma->vm_mm->brk) {
3073 rc = cred_has_perm(cred, cred, PROCESS__EXECHEAP); 3068 rc = cred_has_perm(cred, cred, PROCESS__EXECHEAP);