]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mm: introduce get_task_exe_file
authorMateusz Guzik <mguzik@redhat.com>
Tue, 23 Aug 2016 14:20:38 +0000 (16:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Sep 2016 08:09:28 +0000 (10:09 +0200)
commit2daa86f541b8fa873c56b3cc2c8dc32e03b864fc
tree0d8f06c8344be97174422fd6478bd22b84aa4b07
parent78494c6237c82f0b45fab75c3b2988d00505992c
mm: introduce get_task_exe_file

commit cd81a9170e69e018bbaba547c1fd85a585f5697a upstream.

For more convenient access if one has a pointer to the task.

As a minor nit take advantage of the fact that only task lock + rcu are
needed to safely grab ->exe_file. This saves mm refcount dance.

Use the helper in proc_exe_link.

Signed-off-by: Mateusz Guzik <mguzik@redhat.com>
Acked-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Acked-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/proc/base.c
include/linux/mm.h
kernel/fork.c