From 1ffc7b876d8ab1f82307072d73d8da3ecf23ae66 Mon Sep 17 00:00:00 2001 From: Anton Vorontsov Date: Thu, 31 May 2012 16:26:26 -0700 Subject: [PATCH] --- yaml --- r: 309753 b: refs/heads/master c: 2c922c51e6924298f8271d75732964f1ffdecaf2 h: refs/heads/master i: 309751: ab126ea63866d331437cb87c3e0026b587e7a1a6 v: v3 --- [refs] | 2 +- trunk/arch/um/kernel/reboot.c | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index d22597f69cc7..42d4ca350fe9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 137d1a26c842a384c98dd2a6a605014fddf5c777 +refs/heads/master: 2c922c51e6924298f8271d75732964f1ffdecaf2 diff --git a/trunk/arch/um/kernel/reboot.c b/trunk/arch/um/kernel/reboot.c index 1411f4e79f9a..3d15243ce692 100644 --- a/trunk/arch/um/kernel/reboot.c +++ b/trunk/arch/um/kernel/reboot.c @@ -6,6 +6,7 @@ #include "linux/sched.h" #include "linux/spinlock.h" #include "linux/slab.h" +#include "linux/oom.h" #include "kern_util.h" #include "os.h" #include "skas.h" @@ -25,13 +26,13 @@ static void kill_off_processes(void) read_lock(&tasklist_lock); for_each_process(p) { - task_lock(p); - if (!p->mm) { - task_unlock(p); + struct task_struct *t; + + t = find_lock_task_mm(p); + if (!t) continue; - } - pid = p->mm->context.id.u.pid; - task_unlock(p); + pid = t->mm->context.id.u.pid; + task_unlock(t); os_kill_ptraced_process(pid, 1); } read_unlock(&tasklist_lock);