From: Oleg Nesterov <oleg@tv-sign.ru>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, Kirill Korotaev <dev@sw.ru>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Jeff Dike <jdike@addtoit.com>, Andrew Morton <akpm@osdl.org>
Subject: [PATCH 2/3] pidhash: don't use zero pids
Date: Mon, 30 Jan 2006 14:06:11 +0300 [thread overview]
Message-ID: <43DDF323.4517C349@tv-sign.ru> (raw)
daemonize() calls set_special_pids(1,1), while init and
kernel threads spawned from init/main.c:init() run with
0,0 special pids. This patch changes INIT_SIGNALS() so
that that they run with ->pgrp == ->session == 1 also.
This patch relies on fact that swapper's pid == 1.
Now we never use pid == 0 in kernel/pid.c.
[ Andrew, this patch obsoletes "[PATCH] pid: Don't hash pid 0.",
filename pid-dont-hash-pid-0.patch ].
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- RC-1/include/linux/init_task.h~ZEROPID 2005-11-22 19:35:52.000000000 +0300
+++ RC-1/include/linux/init_task.h 2006-01-30 15:12:46.000000000 +0300
@@ -62,6 +62,8 @@
.posix_timers = LIST_HEAD_INIT(sig.posix_timers), \
.cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \
.rlim = INIT_RLIMITS, \
+ .pgrp = 1, \
+ .session = 1, \
}
#define INIT_SIGHAND(sighand) { \
next reply other threads:[~2006-01-30 9:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-30 11:06 Oleg Nesterov [this message]
2006-01-30 20:36 ` Eric W. Biederman
2006-01-31 6:12 ` Kirill Korotaev
2006-01-31 10:28 ` Oleg Nesterov
2006-01-31 15:02 ` Eric W. Biederman
2006-01-30 22:43 ` Eric W. Biederman
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=43DDF323.4517C349@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@osdl.org \
--cc=dev@sw.ru \
--cc=ebiederm@xmission.com \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
Powered by JetHome