diff options
author | Oleg Nesterov <oleg@redhat.com> | 2009-06-23 21:25:32 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-08-16 14:27:32 -0700 |
commit | a79c30e57c0eac03aae8be4649958f8592141d20 (patch) | |
tree | ed132a7baf13eabacf2c0a3695488a9ca83d63cb /fs/proc/task_nommu.c | |
parent | 3e16ba377737c5815cd1d6315c3cffe9c6e388ad (diff) |
mm_for_maps: simplify, use ptrace_may_access()
commit 13f0feafa6b8aead57a2a328e2fca6a5828bf286 upstream.
It would be nice to kill __ptrace_may_access(). It requires task_lock(),
but this lock is only needed to read mm->flags in the middle.
Convert mm_for_maps() to use ptrace_may_access(), this also simplifies
the code a little bit.
Also, we do not need to take ->mmap_sem in advance. In fact I think
mm_for_maps() should not play with ->mmap_sem at all, the caller should
take this lock.
With or without this patch, without ->cred_guard_mutex held we can race
with exec() and get the new ->mm but check old creds.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/proc/task_nommu.c')
0 files changed, 0 insertions, 0 deletions