Message ID | 1442881977-17595-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 32616f0..7731868 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -3423,8 +3423,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);