Re: [PATCH rc1-mm 2/3] coredump: shutdown current process first

From: Oleg Nesterov
Date: Mon Apr 10 2006 - 06:04:42 EST


On 04/10, Roland McGrath wrote:
>
> I would be inclined to restructure the inner loop something like this:
>
> p = g;
> while (unlikely(p->mm == NULL)) {
> p = next_thread(p);
> if (p == g)
> break;
> }
> if (p->mm == mm) {
> /*
> * p->sighand can't disappear, but
> * may be changed by de_thread()
> */
> lock_task_sighand(p, &flags);
> zap_process(p);
> unlock_task_sighand(p, &flags);
> }

Yes, I agree, this is much more understandable.

Oleg.

-
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/