Re: [PATCH v3] kthread: Make kthread_create() killable.

From: Oleg Nesterov
Date: Tue Sep 24 2013 - 12:44:41 EST


On 09/25, Tetsuo Handa wrote:
>
> Subject: [PATCH] kthread: make kthread_create() killable

The patch looks correct... although I'll try to reread it later ;)

Minor nit, since you are sending the new version anyway...

> + if (unlikely(wait_for_completion_killable(&done))) {
> + /*
> + * If I was SIGKILLed before kthreadd (or new kernel thread)
> + * calls complete(), leave the cleanup of this structure to
> + * that thread.
> + */
> + if (xchg(&create->done, NULL))
> + return ERR_PTR(-ENOMEM);

ENOMEM? Perhaps EINTR makes more sense.

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/