Message ID | 1441276619-13270-1-git-send-email-luis.henriques@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 0e5719c20d61..0234ae038a62 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -3470,8 +3470,10 @@ static int pktgen_thread_worker(void *arg) pktgen_rem_thread(t); /* Wait for kthread_stop */ - while (!kthread_should_stop()) { + for (;;) { set_current_state(TASK_INTERRUPTIBLE); + if (kthread_should_stop()) + break; schedule(); } __set_current_state(TASK_RUNNING);