From: Trond Myklebust Date: Wed, 23 Aug 2006 00:06:03 +0000 (-0400) Subject: VFS: Remove redundant open-coded mode bit check in prepare_binfmt(). X-Git-Tag: MMI-PSA29.97-13-9~47844^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9167b0b9a0ab7907191523f5a0528e3b9c288e21;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git VFS: Remove redundant open-coded mode bit check in prepare_binfmt(). The check in prepare_binfmt() for inode->i_mode & 0111 is redundant, since open_exec() will already have done that. Signed-off-by: Trond Myklebust (cherry picked from 822dec482ced07af32c378cd936d77345786572b commit) --- diff --git a/fs/exec.c b/fs/exec.c index 8344ba73a2a6..a6f64a98ac50 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -922,12 +922,6 @@ int prepare_binprm(struct linux_binprm *bprm) int retval; mode = inode->i_mode; - /* - * Check execute perms again - if the caller has CAP_DAC_OVERRIDE, - * generic_permission lets a non-executable through - */ - if (!(mode & 0111)) /* with at least _one_ execute bit set */ - return -EACCES; if (bprm->file->f_op == NULL) return -EACCES;