+ vfs-remove-redundant-open-coded-mode-bit-checks-in-open_exec.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     VFS: Remove redundant open-coded mode bit checks in open_exec()

has been added to the -mm tree.  Its filename is

     vfs-remove-redundant-open-coded-mode-bit-checks-in-open_exec.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: VFS: Remove redundant open-coded mode bit checks in open_exec()
From: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>

The check in open_exec() for inode->i_mode & 0111 has been made redundant
by the fix to permission().

Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: Christoph Hellwig <hch@xxxxxx>
Cc: Chris Wright <chrisw@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/exec.c |    2 --
 1 file changed, 2 deletions(-)

diff -puN fs/exec.c~vfs-remove-redundant-open-coded-mode-bit-checks-in-open_exec fs/exec.c
--- a/fs/exec.c~vfs-remove-redundant-open-coded-mode-bit-checks-in-open_exec
+++ a/fs/exec.c
@@ -486,8 +486,6 @@ struct file *open_exec(const char *name)
 		if (!(nd.mnt->mnt_flags & MNT_NOEXEC) &&
 		    S_ISREG(inode->i_mode)) {
 			int err = vfs_permission(&nd, MAY_EXEC);
-			if (!err && !(inode->i_mode & 0111))
-				err = -EACCES;
 			file = ERR_PTR(err);
 			if (!err) {
 				file = nameidata_to_filp(&nd, O_RDONLY);
_

Patches currently in -mm which might be from Trond.Myklebust@xxxxxxxxxx are

vfs-fix-accessfile-x_ok-in-the-presence-of-acls.patch
vfs-remove-redundant-open-coded-mode-bit-check-in-prepare_binfmt.patch
vfs-remove-redundant-open-coded-mode-bit-checks-in-open_exec.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux