proc: io_accounting: Use new infrastructure to fix deadlocks in execve
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 20 Mar 2020 20:27:41 +0000 (21:27 +0100)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 25 Mar 2020 15:04:01 +0000 (10:04 -0500)
commit76518d3798855242817e8a8ed76b2d72f4415624
tree6083ace017fc32db4ad5a50fb14ae4a3fa9ffad4
parent2db9dbf71bf98d02a0bf33e798e5bfd2a9944696
proc: io_accounting: Use new infrastructure to fix deadlocks in execve

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

This fixes possible deadlocks when the trace is accessing
/proc/$pid/io for instance.

This should be safe, as the credentials are only used for reading.

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