aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/exec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 0b685888ff6f..f20561ff4528 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -134,6 +134,9 @@ asmlinkage long sys_uselib(const char __user * library)
134 if (error) 134 if (error)
135 goto out; 135 goto out;
136 136
137 error = -EACCES;
138 if (nd.mnt->mnt_flags & MNT_NOEXEC)
139 goto exit;
137 error = -EINVAL; 140 error = -EINVAL;
138 if (!S_ISREG(nd.dentry->d_inode->i_mode)) 141 if (!S_ISREG(nd.dentry->d_inode->i_mode))
139 goto exit; 142 goto exit;