mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] 1/2 daemonize() calls reparent_to_init() cleanup
@ 2002-09-04  3:48 Rusty Russell
  0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2002-09-04  3:48 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel

Initialize child_reaper at idle thread entry: eg. ksoftirqd's PPID is
0, because it calls reparent_to_init() before child_reaper is
initialized.

Name: Early child_reaper initialization
Author: Rusty Russell
Status: Trivial

D: This sets child_reaper to the idle thread upon creation, so that
D: ksoftirqd's reparent_to_init call doesn't get the swapper as parent.

--- working-2.5.33-hotcpu-cpudown-i386/init/main.c.~1~	Tue Sep  3 14:05:43 2002
+++ working-2.5.33-hotcpu-cpudown-i386/init/main.c	Wed Sep  4 13:33:32 2002
@@ -490,16 +493,6 @@
  */
 static void __init do_basic_setup(void)
 {
-	/*
-	 * Tell the world that we're going to be the grim
-	 * reaper of innocent orphaned children.
-	 *
-	 * We don't want people to have to make incorrect
-	 * assumptions about where in the task array this
-	 * can be found.
-	 */
-	child_reaper = current;
-
 #if defined(CONFIG_MTRR)	/* Do this after SMP initialization */
 /*
  * We should probably create some architecture-dependent "fixup after
@@ -545,6 +538,16 @@
 	static char * argv_sh[] = { "sh", NULL, };
 
 	lock_kernel();
+	/*
+	 * Tell the world that we're going to be the grim
+	 * reaper of innocent orphaned children.
+	 *
+	 * We don't want people to have to make incorrect
+	 * assumptions about where in the task array this
+	 * can be found.
+	 */
+	child_reaper = current;
+
 	/* Sets up cpus_possible() */
 	smp_prepare_cpus(max_cpus);
 

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-04  3:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-04  3:48 [PATCH] 1/2 daemonize() calls reparent_to_init() cleanup Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®