mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] 1/2 daemonize() calls reparent_to_init() cleanup
Date: Wed, 04 Sep 2002 13:48:42 +1000	[thread overview]
Message-ID: <20020904034904.57D582C057@lists.samba.org> (raw)

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.

                 reply	other threads:[~2002-09-04  3:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020904034904.57D582C057@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®