Skip to content

Move Exit Connectors

Matt Helsley lkml 1 version In review

Get series with b4
b4 am 1136488842.22868.142.camel@stark

Versions newest first

  1. v1 Latest0 of 1 patch 34 repliesIn review

Patches in v1 No applies recorded yet

The patch the cover letter announces is not in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/01] Move Exit Connectors

This patch moves both the process exit event and per-process stats
connectors above exit_mm() since the latter needs values from the mm_struct which will be lost after exit_mm().

--

kernel/exit.c +4 -4
Index: linux-2.6.15/kernel/exit.c
===================================================================
@@ -845,10 +845,14 @@ fastcall NORET_TYPE void do_exit(long co
 	if (group_dead) {
  		del_timer_sync(&tsk->signal->real_timer);
 		exit_itimers(tsk->signal);
 		acct_process(code);
 	}
+
+	tsk->exit_code = code;
+	proc_exit_connector(tsk);
+	cnstats_exit_connector(tsk);
 	exit_mm(tsk);
 
 	exit_sem(tsk);
 	__exit_files(tsk);
 	__exit_fs(tsk);
@@ -861,14 +865,10 @@ fastcall NORET_TYPE void do_exit(long co
 		disassociate_ctty(1);
 
 	module_put(task_thread_info(tsk)->exec_domain->module);
 	if (tsk->binfmt)
 		module_put(tsk->binfmt->module);
-
-	tsk->exit_code = code;
-	proc_exit_connector(tsk);
-	cnstats_exit_connector(tsk);
 	exit_notify(tsk);
 #ifdef CONFIG_NUMA
 	mpol_free(tsk->mempolicy);
 	tsk->mempolicy = NULL;
 #endif