]> git.baikalelectronics.ru Git - kernel.git/commit
mm: introduce get_task_exe_file
authorMateusz Guzik <mguzik@redhat.com>
Tue, 23 Aug 2016 14:20:38 +0000 (16:20 +0200)
committerPaul Moore <paul@paul-moore.com>
Wed, 31 Aug 2016 20:11:20 +0000 (16:11 -0400)
commit5f3ac8b5231af194d8157ce781004e93664c9269
treeb0c11dc4cc55aba04e21f8c7352b8c516124cbdb
parent71f67fc17746d03daf9a5501cb6831599fdcc5d7
mm: introduce get_task_exe_file

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>
Cc: <stable@vger.kernel.org> # 4.3.x
Signed-off-by: Paul Moore <paul@paul-moore.com>
fs/proc/base.c
include/linux/mm.h
kernel/fork.c