mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	exit: Stop poorly open coding do_task_dead in make_task_dead
When the kernel detects it is oops or otherwise force killing a task while it exits the code poorly attempts to permanently stop the task from scheduling. I say poorly because it is possible for a task in TASK_UINTERRUPTIBLE to be woken up. As it makes no sense for the task to continue call do_task_dead instead which actually does the work and permanently removes the task from the scheduler. Guaranteeing the task will never be woken up again. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
		
							parent
							
								
									05ea0424f0
								
							
						
					
					
						commit
						7f80a2fd7d
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
					@ -886,8 +886,7 @@ void __noreturn make_task_dead(int signr)
 | 
				
			||||||
	if (unlikely(tsk->flags & PF_EXITING)) {
 | 
						if (unlikely(tsk->flags & PF_EXITING)) {
 | 
				
			||||||
		pr_alert("Fixing recursive fault but reboot is needed!\n");
 | 
							pr_alert("Fixing recursive fault but reboot is needed!\n");
 | 
				
			||||||
		futex_exit_recursive(tsk);
 | 
							futex_exit_recursive(tsk);
 | 
				
			||||||
		set_current_state(TASK_UNINTERRUPTIBLE);
 | 
							do_task_dead();
 | 
				
			||||||
		schedule();
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	do_exit(signr);
 | 
						do_exit(signr);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue