Re: [PATCH 1/4] INIT_TASK() should initialize ->thread_group list

From: Sukadev Bhattiprolu
Date: Tue May 11 2010 - 22:10:11 EST


Oleg Nesterov [oleg@xxxxxxxxxx] wrote:
| The trivial /sbin/init doing
|
| int main(void)
| {
| kill(0, SIGKILL)
| }
|
| crashes the kernel.

Really subtle. Good catch.

So, now init is not part of any process group until it calls setsid().
So the above SIGKILL is lost right ? - i.e it does not kill even init
itself.

In my quick test, the following init process lives on inspite of the
SIGKILL.

main()
{
kill(0, SIGKILL);

while(1)
sleep(1);
}

I don't have a better solution. Maybe a hung init is better than a
crashed kernel. the patches look good.

Acked-by: Sukadev Bhattiprolu <sukadev@xxxxxxxxxxxxxxxxxx>
--
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/