Re: [PATCH] exit signals: use of uninitialized field notify_count

From: Oleg Nesterov
Date: Thu Aug 28 2008 - 08:53:53 EST


On 08/27, Steve VanDeBogart wrote:
>
> It looks like that would work. Seems that
> sig->count == 0 && sig->group_exit_task != NULL can never be true.
> If it does work, a lot of initialization in copy_signal() can be
> removed and it would reduce the chances that a similar problem would be
> reintroduced. I would submit a patch, but I'm not sure how to trigger
> those code paths in order to test it.

I'd suggest to make 2 patches. The first one adds "->notify_count = 0"
to copy_signal() and removes "->group_exit_task != NULL" checks. The
second one changes copy_signal() to use zalloc.

BTW, I forgot to mention that you can kill the "thread_group_leader()"
check in exit_notify() too.

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/