Re: [PATCH 5/5] oom: dump_tasks() use find_lock_task_mm() too

From: KOSAKI Motohiro
Date: Wed Jun 02 2010 - 09:54:10 EST


> dump_task() should have the same process iteration logic as
> select_bad_process().
>
> It is needed for protecting from task exiting race.
>
>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>

sorry, this patch made one warning.
incremental patch is here.



Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
---
mm/oom_kill.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index b06f8d1..f33a1b8 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -334,8 +334,6 @@ static void dump_tasks(const struct mem_cgroup *mem)
"name\n");

for_each_process(p) {
- struct mm_struct *mm;
-
if (is_global_init(p) || (p->flags & PF_KTHREAD))
continue;
if (mem && !task_in_mem_cgroup(p, mem))
--
1.6.5.2



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/