aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/binfmts.h
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2013-09-11 17:24:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-11 18:59:04 -0400
commit131b2f9f1214f338f0bf7c0d9760019f2b1d0c20 (patch)
treeb60a498414e259fe4e81f210378538f90ada9224 /include/linux/binfmts.h
parent5d1baf3b63bfc8c709dc44df85ff1475c7ef489d (diff)
exec: kill "int depth" in search_binary_handler()
Nobody except search_binary_handler() should touch ->recursion_depth, "int depth" buys nothing but complicates the code, kill it. Probably we should also kill "fn" and the !NULL check, ->load_binary should be always defined. And it can not go away after read_unlock() or this code is buggy anyway. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Al Viro <viro@ZenIV.linux.org.uk> Cc: Evgeniy Polyakov <zbr@ioremap.net> Cc: Zach Levis <zml@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/binfmts.h')
-rw-r--r--include/linux/binfmts.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index 70cf138690e9..e8112ae50531 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -31,7 +31,7 @@ struct linux_binprm {
31#ifdef __alpha__ 31#ifdef __alpha__
32 unsigned int taso:1; 32 unsigned int taso:1;
33#endif 33#endif
34 unsigned int recursion_depth; 34 unsigned int recursion_depth; /* only for search_binary_handler() */
35 struct file * file; 35 struct file * file;
36 struct cred *cred; /* new credentials */ 36 struct cred *cred; /* new credentials */
37 int unsafe; /* how unsafe this exec is (mask of LSM_UNSAFE_*) */ 37 int unsafe; /* how unsafe this exec is (mask of LSM_UNSAFE_*) */