]> Git Repo - linux.git/commit
exec: Don't open code get_close_on_exec
authorEric W. Biederman <[email protected]>
Wed, 9 Dec 2020 21:42:57 +0000 (15:42 -0600)
committerEric W. Biederman <[email protected]>
Thu, 10 Dec 2020 18:39:00 +0000 (12:39 -0600)
commit878f12dbb8f514799d126544d59be4d2675caac3
treeec5a16bc7ca1fd440c8aa9f2bf29c21cd3189c62
parent3650b228f83adda7e5ee532e2b90429c03f7b9ec
exec: Don't open code get_close_on_exec

Al Viro pointed out that using the phrase "close_on_exec(fd,
rcu_dereference_raw(current->files->fdt))" instead of wrapping it in
rcu_read_lock(), rcu_read_unlock() is a very questionable
optimization[1].

Once wrapped with rcu_read_lock()/rcu_read_unlock() that phrase
becomes equivalent the helper function get_close_on_exec so
simplify the code and make it more robust by simply using
get_close_on_exec.

[1] https://lkml.kernel.org/r/20201207222214[email protected]
Suggested-by: Al Viro <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Eric W. Biederman <[email protected]>
fs/exec.c
This page took 0.052789 seconds and 4 git commands to generate.