Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1a159dd229e6a70e3ffd3f785cb51fa61b232279
Commit:     1a159dd229e6a70e3ffd3f785cb51fa61b232279
Parent:     22590e41cb569add194829c08dc0ceea74b38a65
Author:     Miklos Szeredi <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 23:27:08 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 08:42:52 2007 -0700

    exec: remove unnecessary check for MNT_NOEXEC
    
    vfs_permission(MAY_EXEC) checks if the filesystem is mounted with "noexec", 
so
    there's no need to repeat this check in sys_uselib() and open_exec().
    
    Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]>
    Cc: Al Viro <[EMAIL PROTECTED]>
    Cc: Christoph Hellwig <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/exec.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index cbd183d..59c0038 100644
--- 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) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to