]> git.baikalelectronics.ru Git - kernel.git/commit
pidfd: Use new infrastructure to fix deadlocks in execve
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Sat, 21 Mar 2020 02:46:16 +0000 (02:46 +0000)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 25 Mar 2020 15:04:01 +0000 (10:04 -0500)
commit3aabce37bf30d0a89ad0a225ff1dc409a0498d65
tree1daa6f09d76a01c93cb59372e85e017a833ca5c9
parentc5a829dcd8dd5895d35b2238113433ab29b257eb
pidfd: Use new infrastructure to fix deadlocks in execve

This changes __pidfd_fget to use the new exec_update_mutex
instead of cred_guard_mutex.

This should be safe, as the credentials do not change
before exec_update_mutex is locked.  Therefore whatever
file access is possible with holding the cred_guard_mutex
here is also possbile with the exec_update_mutex.

Signed-off-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
kernel/pid.c