mirror of
				https://github.com/torvalds/linux.git
				synced 2025-10-31 08:38:45 +02:00 
			
		
		
		
	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: Oleg Nesterov <oleg@redhat.com> Reviewed-by: Kirill Tkhai <ktkhai@odin.com> Reviewed-by: Srikar 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.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
		
							parent
							
								
									5473e0cc37
								
							
						
					
					
						commit
						a75a6068da
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -304,8 +304,8 @@ static inline void check_for_tasks(int dead_cpu) | |||
| { | ||||
| 	struct task_struct *g, *p; | ||||
| 
 | ||||
| 	read_lock_irq(&tasklist_lock); | ||||
| 	do_each_thread(g, p) { | ||||
| 	read_lock(&tasklist_lock); | ||||
| 	for_each_process_thread(g, p) { | ||||
| 		if (!p->on_rq) | ||||
| 			continue; | ||||
| 		/*
 | ||||
|  | @ -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", | ||||
| 			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 { | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Oleg Nesterov
						Oleg Nesterov