diff options
author | David Howells <dhowells@redhat.com> | 2008-11-13 18:39:19 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-11-13 18:39:19 -0500 |
commit | c69e8d9c01db2adc503464993c358901c9af9de4 (patch) | |
tree | bed94aaa9aeb7a7834d1c880f72b62a11a752c78 /mm/oom_kill.c | |
parent | 86a264abe542cfececb4df129bc45a0338d8cdb9 (diff) |
CRED: Use RCU to access another task's creds and to release a task's own creds
Use RCU to access another task's creds and to release a task's own creds.
This means that it will be possible for the credentials of a task to be
replaced without another task (a) requiring a full lock to read them, and (b)
seeing deallocated memory.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: James Morris <jmorris@namei.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r-- | mm/oom_kill.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 3af787ba2077..0e0b282a2073 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -298,9 +298,9 @@ static void dump_tasks(const struct mem_cgroup *mem) | |||
298 | 298 | ||
299 | task_lock(p); | 299 | task_lock(p); |
300 | printk(KERN_INFO "[%5d] %5d %5d %8lu %8lu %3d %3d %s\n", | 300 | printk(KERN_INFO "[%5d] %5d %5d %8lu %8lu %3d %3d %s\n", |
301 | p->pid, p->cred->uid, p->tgid, p->mm->total_vm, | 301 | p->pid, __task_cred(p)->uid, p->tgid, |
302 | get_mm_rss(p->mm), (int)task_cpu(p), p->oomkilladj, | 302 | p->mm->total_vm, get_mm_rss(p->mm), (int)task_cpu(p), |
303 | p->comm); | 303 | p->oomkilladj, p->comm); |
304 | task_unlock(p); | 304 | task_unlock(p); |
305 | } while_each_thread(g, p); | 305 | } while_each_thread(g, p); |
306 | } | 306 | } |