diff -NurpP --minimal linux-4.4.113-vs2.3.9.6/kernel/exit.c linux-4.4.113-vs2.3.9.6.1/kernel/exit.c --- linux-4.4.113-vs2.3.9.6/kernel/exit.c 2018-01-09 16:59:03.000000000 +0000 +++ linux-4.4.113-vs2.3.9.6.1/kernel/exit.c 2018-02-06 16:23:19.000000000 +0000 @@ -805,6 +805,10 @@ void do_exit(long code) if (unlikely(current->pi_state_cache)) kfree(current->pi_state_cache); #endif + /* needs to stay after exit_notify() */ + exit_vx_info(tsk, code); + exit_nx_info(tsk); + /* * Make sure we are holding no locks: */ @@ -849,10 +853,6 @@ void do_exit(long code) smp_mb(); raw_spin_unlock_wait(&tsk->pi_lock); - /* needs to stay after exit_notify() */ - exit_vx_info(tsk, code); - exit_nx_info(tsk); - /* causes final put_task_struct in finish_task_switch(). */ tsk->state = TASK_DEAD; tsk->flags |= PF_NOFREEZE; /* tell freezer to ignore us */