diff options
-rw-r--r-- | net/core/pktgen.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index fc17a9d309ac..b61f553689b6 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -3407,10 +3407,10 @@ static int pktgen_thread_worker(void *arg) | |||
3407 | 3407 | ||
3408 | pr_debug("starting pktgen/%d: pid=%d\n", cpu, task_pid_nr(current)); | 3408 | pr_debug("starting pktgen/%d: pid=%d\n", cpu, task_pid_nr(current)); |
3409 | 3409 | ||
3410 | set_current_state(TASK_INTERRUPTIBLE); | ||
3411 | |||
3412 | set_freezable(); | 3410 | set_freezable(); |
3413 | 3411 | ||
3412 | __set_current_state(TASK_RUNNING); | ||
3413 | |||
3414 | while (!kthread_should_stop()) { | 3414 | while (!kthread_should_stop()) { |
3415 | pkt_dev = next_to_run(t); | 3415 | pkt_dev = next_to_run(t); |
3416 | 3416 | ||
@@ -3424,8 +3424,6 @@ static int pktgen_thread_worker(void *arg) | |||
3424 | continue; | 3424 | continue; |
3425 | } | 3425 | } |
3426 | 3426 | ||
3427 | __set_current_state(TASK_RUNNING); | ||
3428 | |||
3429 | if (likely(pkt_dev)) { | 3427 | if (likely(pkt_dev)) { |
3430 | pktgen_xmit(pkt_dev); | 3428 | pktgen_xmit(pkt_dev); |
3431 | 3429 | ||
@@ -3456,9 +3454,8 @@ static int pktgen_thread_worker(void *arg) | |||
3456 | } | 3454 | } |
3457 | 3455 | ||
3458 | try_to_freeze(); | 3456 | try_to_freeze(); |
3459 | |||
3460 | set_current_state(TASK_INTERRUPTIBLE); | ||
3461 | } | 3457 | } |
3458 | set_current_state(TASK_INTERRUPTIBLE); | ||
3462 | 3459 | ||
3463 | pr_debug("%s stopping all device\n", t->tsk->comm); | 3460 | pr_debug("%s stopping all device\n", t->tsk->comm); |
3464 | pktgen_stop(t); | 3461 | pktgen_stop(t); |