Re: [PATCH 1/2] kthread: make struct kthread kmalloc'ed

From: Thomas Gleixner
Date: Fri Oct 28 2016 - 14:51:42 EST


On Fri, 28 Oct 2016, Oleg Nesterov wrote:

> I still think we should kill struct kthread in its current form, but this
> needs cleanups outside of kthread.c.
>
> So make it kmalloc'ed for now to avoid the problems with stack corruption,
> for example the crashed kthread will likely OOPS again because its .exited
> was destroyed by rewind_stack_do_exit().
>
> Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>

Reviewed-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>