Use ERESTART_RESTARTBLOCK if poll() is interrupted by a signal
[firefly-linux-kernel-4.4.55.git] / fs / exec.c
index cbd183daaad45c29af75573d17b42e11259b2c42..59c0038baa4f2ed428149202ab410940b5927fd2 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -112,9 +112,6 @@ asmlinkage long sys_uselib(const char __user * library)
        if (error)
                goto out;
 
-       error = -EACCES;
-       if (nd.mnt->mnt_flags & MNT_NOEXEC)
-               goto exit;
        error = -EINVAL;
        if (!S_ISREG(nd.dentry->d_inode->i_mode))
                goto exit;
@@ -658,8 +655,7 @@ struct file *open_exec(const char *name)
        if (!err) {
                struct inode *inode = nd.dentry->d_inode;
                file = ERR_PTR(-EACCES);
-               if (!(nd.mnt->mnt_flags & MNT_NOEXEC) &&
-                   S_ISREG(inode->i_mode)) {
+               if (S_ISREG(inode->i_mode)) {
                        int err = vfs_permission(&nd, MAY_EXEC);
                        file = ERR_PTR(err);
                        if (!err) {