mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-11-01 09:13:37 +00:00 
			
		
		
		
	printk: Fix scheduling-while-atomic problem in console_cpu_notify()
The console_cpu_notify() function runs with interrupts disabled in the CPU_DYING case. It therefore cannot block, for example, as will happen when it calls console_lock(). Therefore, remove the CPU_DYING leg of the switch statement to avoid this problem. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
		
							parent
							
								
									75fa29c700
								
							
						
					
					
						commit
						85eae82a08
					
				
					 1 changed files with 0 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1890,7 +1890,6 @@ static int __cpuinit console_cpu_notify(struct notifier_block *self,
 | 
			
		|||
	switch (action) {
 | 
			
		||||
	case CPU_ONLINE:
 | 
			
		||||
	case CPU_DEAD:
 | 
			
		||||
	case CPU_DYING:
 | 
			
		||||
	case CPU_DOWN_FAILED:
 | 
			
		||||
	case CPU_UP_CANCELED:
 | 
			
		||||
		console_lock();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue