Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

unwind: Add comment to unwind_deferred_task_exit()

Explain why unwind_deferred_task_exit() exist and its constraints.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Link: https://patch.msgid.link/20250924080118.893367437@infradead.org

+6 -1
+6 -1
kernel/exit.c
··· 939 939 940 940 tsk->exit_code = code; 941 941 taskstats_exit(tsk, group_dead); 942 - unwind_deferred_task_exit(tsk); 943 942 trace_sched_process_exit(tsk, group_dead); 944 943 945 944 /* ··· 949 950 * gets woken up by child-exit notifications. 950 951 */ 951 952 perf_event_exit_task(tsk); 953 + /* 954 + * PF_EXITING (above) ensures unwind_deferred_request() will no 955 + * longer add new unwinds. While exit_mm() (below) will destroy the 956 + * abaility to do unwinds. So flush any pending unwinds here. 957 + */ 958 + unwind_deferred_task_exit(tsk); 952 959 953 960 exit_mm(); 954 961