diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/kernel/reboot.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/um/kernel/reboot.c b/arch/um/kernel/reboot.c index 4d93dff6b37..66d754c46e7 100644 --- a/arch/um/kernel/reboot.c +++ b/arch/um/kernel/reboot.c | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/sched.h" | 6 | #include "linux/sched.h" |
7 | #include "linux/spinlock.h" | ||
7 | #include "linux/slab.h" | 8 | #include "linux/slab.h" |
8 | #include "kern_util.h" | 9 | #include "kern_util.h" |
9 | #include "os.h" | 10 | #include "os.h" |
@@ -22,6 +23,7 @@ static void kill_off_processes(void) | |||
22 | struct task_struct *p; | 23 | struct task_struct *p; |
23 | int pid; | 24 | int pid; |
24 | 25 | ||
26 | read_lock(&tasklist_lock); | ||
25 | for_each_process(p) { | 27 | for_each_process(p) { |
26 | if (p->mm == NULL) | 28 | if (p->mm == NULL) |
27 | continue; | 29 | continue; |
@@ -29,6 +31,7 @@ static void kill_off_processes(void) | |||
29 | pid = p->mm->context.id.u.pid; | 31 | pid = p->mm->context.id.u.pid; |
30 | os_kill_ptraced_process(pid, 1); | 32 | os_kill_ptraced_process(pid, 1); |
31 | } | 33 | } |
34 | read_unlock(&tasklist_lock); | ||
32 | } | 35 | } |
33 | } | 36 | } |
34 | 37 | ||