Commit a75a6068 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Ingo Molnar

cpu/hotplug: Read_lock(tasklist_lock) doesn't need to disable irqs

check_for_tasks() doesn't need to disable irqs, recursive
read_lock() from interrupt is fine.

While at it, s/do_each_thread/for_each_process_thread/.
Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Reviewed-by: default avatarKirill Tkhai <ktkhai@odin.com>
Reviewed-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Kirill Tkhai <ktkhai@parallels.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20150910130750.GA20055@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 5473e0cc
...@@ -304,8 +304,8 @@ static inline void check_for_tasks(int dead_cpu) ...@@ -304,8 +304,8 @@ static inline void check_for_tasks(int dead_cpu)
{ {
struct task_struct *g, *p; struct task_struct *g, *p;
read_lock_irq(&tasklist_lock); read_lock(&tasklist_lock);
do_each_thread(g, p) { for_each_process_thread(g, p) {
if (!p->on_rq) if (!p->on_rq)
continue; continue;
/* /*
...@@ -320,8 +320,8 @@ static inline void check_for_tasks(int dead_cpu) ...@@ -320,8 +320,8 @@ static inline void check_for_tasks(int dead_cpu)
pr_warn("Task %s (pid=%d) is on cpu %d (state=%ld, flags=%x)\n", pr_warn("Task %s (pid=%d) is on cpu %d (state=%ld, flags=%x)\n",
p->comm, task_pid_nr(p), dead_cpu, p->state, p->flags); p->comm, task_pid_nr(p), dead_cpu, p->state, p->flags);
} while_each_thread(g, p); }
read_unlock_irq(&tasklist_lock); read_unlock(&tasklist_lock);
} }
struct take_cpu_down_param { struct take_cpu_down_param {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment