Re: [PATCH 2/3] pidhash: don't use zero pids

From: Kirill Korotaev
Date: Tue Jan 31 2006 - 01:11:47 EST


Hello Oleg,

I had quite the same comment, but had no time to check it.
I can't understand what problem do you solve, or just making code cleaner (from your point of view)?
For me it was quite natural that pid=0 is used by idle, and I'm very suspicuos about such changes.

Kirill

Oleg Nesterov <oleg@xxxxxxxxxx> writes:

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.

This changes what is visible to user space, for the case
where we are not a member of a session of a process group.

By hashing the values these non-groups become available to
user space. Which I find disturbing. Before I can comment
further I need to see if there are any well defined semantics
for processes that are not part of a session or a process
group. If there are well defined semantics we have just
broken user space.

Eric

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/