Re: + remove-the-likelypid-check-in-copy_process.patch added to -mm tree

From: Eric W. Biederman
Date: Fri Mar 16 2007 - 14:28:50 EST


Oleg Nesterov <oleg@xxxxxxxxxx> writes:

> Sukadev Bhattiprolu wrote:
>
> This means that idle threads (except "swapper") are visible to
> for_each_process()
> and do_each_thread(). Looks dangerous and somewhat strange to me.
>
> Could you explain this change?

Good catch. I've been so busy pounding reviewing this patches into
something that made sense that I missed the fact that we care about
this for more than just the NULL pointer that would occur if we didn't
do this.

Still it would be good if we could find a way to remove this rare
special case.

Any chance we can undo what we don't want done for_idle, or create
a factor of copy_process that only does as much as fork_idle should do,
and make copy_process a wrapper that does the rest.

I doubt it is significant anywhere but it would be nice to remove a
branch that except at boot up never happens.

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/