]> git.baikalelectronics.ru Git - kernel.git/commit
exec: kill "int depth" in search_binary_handler()
authorOleg Nesterov <oleg@redhat.com>
Wed, 11 Sep 2013 21:24:39 +0000 (14:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Sep 2013 22:59:04 +0000 (15:59 -0700)
commit0fee9005f7b59fce5d2a9bef7bfd3758d14af3b6
treeb60a498414e259fe4e81f210378538f90ada9224
parent581533bb591b1f595231f7491a97c323f801d9f2
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>
fs/exec.c
include/linux/binfmts.h