Re: [PATCH v6 14/16] pidfd: Use new infrastructure to fix deadlocks in execve

From: Christian Brauner
Date: Wed Mar 25 2020 - 11:41:17 EST


On Sat, Mar 21, 2020 at 02:46:16AM +0000, Bernd Edlinger wrote:
> 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@xxxxxxxxxx>

Reviewed-by: Christian Brauner <christian.brauner@xxxxxxxxxx>