All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] pidhash: don't use zero pids
@ 2006-01-30 11:06 Oleg Nesterov
  2006-01-30 20:36 ` Eric W. Biederman
  2006-01-30 22:43 ` Eric W. Biederman
  0 siblings, 2 replies; 6+ messages in thread
From: Oleg Nesterov @ 2006-01-30 11:06 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Kirill Korotaev, Eric W. Biederman, Jeff Dike,
	Andrew Morton

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) {						\

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-01-31 15:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-30 11:06 [PATCH 2/3] pidhash: don't use zero pids Oleg Nesterov
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.