lkml.org 
[lkml]   [2011]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] oom: add uid to "Killed process" message
Date
Add user id to the oom killer's "Killed process" message, so the user of the
killed process can be identified.

Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
---
mm/oom_kill.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index e4b0991..249a15a 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -427,8 +427,9 @@ static int oom_kill_task(struct task_struct *p, struct mem_cgroup *mem)
/* mm cannot be safely dereferenced after task_unlock(p) */
mm = p->mm;

- pr_err("Killed process %d (%s) total-vm:%lukB, anon-rss:%lukB, file-rss:%lukB\n",
- task_pid_nr(p), p->comm, K(p->mm->total_vm),
+ pr_err("Killed process %d (%s) uid: %d, total-vm:%lukB, "
+ "anon-rss:%lukB, file-rss:%lukB\n",
+ task_pid_nr(p), p->comm, task_uid(p), K(p->mm->total_vm),
K(get_mm_counter(p->mm, MM_ANONPAGES)),
K(get_mm_counter(p->mm, MM_FILEPAGES)));
task_unlock(p);
--
1.7.4.4


\
 
 \ /
  Last update: 2011-06-20 13:07    [W:0.059 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site