To: Christoph Hellwig <hch@...>, Eric W. Biederman <ebiederm@...>, Andrew Morton <akpm@...>, <containers@...>, <linux-kernel@...>, Marcel Holtmann <marcel@...>, <rusty@...>
In that case it is better to grab a reference in kthread(). This also
close the race when a new thread is woken (freezer) and exits before
kthread_create() does get_task_struct().
This is not true anymore, see another patch from Eric
kthread-enhance-kthread_stop-to-abort-interruptible-sleeps.patch
Oleg.
-