Re: [PATCH] net: pktgen: don't abuse current->state in pktgen_thread_worker()

From: David Miller
Date: Fri Aug 07 2015 - 02:53:05 EST


From: Oleg Nesterov <oleg@xxxxxxxxxx>
Date: Tue, 4 Aug 2015 18:33:34 +0200

> Commit 1fbe4b46caca "net: pktgen: kill the Wait for kthread_stop
> code in pktgen_thread_worker()" removed (in particular) the final
> __set_current_state(TASK_RUNNING) and I didn't notice the previous
> set_current_state(TASK_INTERRUPTIBLE). This triggers the warning
> in __might_sleep() after return.
>
> Afaics, we can simply remove both set_current_state()'s, and we
> could do this a long ago right after ef87979c273a2 "pktgen: better
> scheduler friendliness" which changed pktgen_thread_worker() to
> use wait_event_interruptible_timeout().
>
> Reported-by: Huang Ying <ying.huang@xxxxxxxxx>
> Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>

Applied, thank you.
--
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/