diff options
Diffstat (limited to 'kernel/exit.c')
| -rw-r--r-- | kernel/exit.c | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 3e8a0282e9a..ab06b9f88f6 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -926,6 +926,14 @@ fastcall NORET_TYPE void do_exit(long code)  	tsk->mempolicy = NULL;  #endif  	/* +	 * This must happen late, after the PID is not +	 * hashed anymore: +	 */ +	if (unlikely(!list_empty(&tsk->pi_state_list))) +		exit_pi_state_list(tsk); +	if (unlikely(current->pi_state_cache)) +		kfree(current->pi_state_cache); +	/*  	 * If DEBUG_MUTEXES is on, make sure we are holding no locks:  	 */  	mutex_debug_check_no_locks_held(tsk);  |