net: pktgen: fix race between pktgen_thread_worker() and kthread_stop()
net: pktgen: fix race between pktgen_thread_worker() and kthread_stop()

pktgen_thread_worker() is obviously racy, kthread_stop() can come
between the kthread_should_stop() check and set_current_state().

Signed-off-by: Oleg Nesterov <20b70f0af00562e63758b9ee42012ecc96c58590@redhat.com>
Reported-by: Jan Stancek <1cdc26788c5bb66f1c315a7f9f8b93926cbf61a9@redhat.com>
Reported-by: Marcelo Leitner <518d07701a80fb29f0da45c7c615106b9be9d5c6@redhat.com>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs