exec: Make unlocking exec_update_mutex explict
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 2 Apr 2020 23:04:54 +0000 (18:04 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Thu, 7 May 2020 21:55:47 +0000 (16:55 -0500)
commit89826cce37542f7950e8f4b9258284805e98430c
tree6c56c7eed4eb0022a707cbd9b4d648440565bad7
parente7f7785449a1f459a4a3ca92f82f56fb054dd2b9
exec: Make unlocking exec_update_mutex explict

With install_exec_creds updated to follow immediately after
setup_new_exec, the failure of unshare_sighand is the only
code path where exec_update_mutex is held but not explicitly
unlocked.

Update that code path to explicitly unlock exec_update_mutex.

Remove the unlocking of exec_update_mutex from free_bprm.

Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Greg Ungerer <gerg@linux-m68k.org>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
fs/exec.c
include/linux/binfmts.h