]> git.proxmox.com Git - mirror_ubuntu-zesty-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)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 20 Oct 2016 13:04:50 +0000 (08:04 -0500)
commit3854c33859e604a0703a84c884cc6e4d55c00720
tree686554aa449a1ef7f77194e34781bfadc5dae9c9
parentcbdfd85ab3eae3acd7377e0d01ab59faecf45c69
mm: introduce get_task_exe_file

BugLink: http://bugs.launchpad.net/bugs/1627730
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>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
fs/proc/base.c
include/linux/mm.h
kernel/fork.c