diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-09-02 00:55:56 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-09-02 00:55:56 +0200 |
commit | 511a8cdb650544b7efd1bbccf7967d3153aee5f6 (patch) | |
tree | 9e97e173ca7fb552e4994dd527dcff396acfdcfb /fs/proc | |
parent | Merge tag 'xfs-iomap-for-linus-4.8-rc5' of git://git.kernel.org/pub/scm/linux... (diff) | |
parent | audit: fix exe_file access in audit_exe_compare (diff) | |
download | linux-511a8cdb650544b7efd1bbccf7967d3153aee5f6.tar.xz linux-511a8cdb650544b7efd1bbccf7967d3153aee5f6.zip |
Merge branch 'stable-4.8' of git://git.infradead.org/users/pcmoore/audit
Pull audit fixes from Paul Moore:
"Two small patches to fix some bugs with the audit-by-executable
functionality we introduced back in v4.3 (both patches are marked
for the stable folks)"
* 'stable-4.8' of git://git.infradead.org/users/pcmoore/audit:
audit: fix exe_file access in audit_exe_compare
mm: introduce get_task_exe_file
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/base.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 54e270262979..ac0df4dde823 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1556,18 +1556,13 @@ static const struct file_operations proc_pid_set_comm_operations = { static int proc_exe_link(struct dentry *dentry, struct path *exe_path) { struct task_struct *task; - struct mm_struct *mm; struct file *exe_file; task = get_proc_task(d_inode(dentry)); if (!task) return -ENOENT; - mm = get_task_mm(task); + exe_file = get_task_exe_file(task); put_task_struct(task); - if (!mm) - return -ENOENT; - exe_file = get_mm_exe_file(mm); - mmput(mm); if (exe_file) { *exe_path = exe_file->f_path; path_get(&exe_file->f_path); |