summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/core/pktgen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 77a59980b579..b81369b6ddc0 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3755,13 +3755,13 @@ static void __exit pg_cleanup(void)
{
struct pktgen_thread *t;
struct list_head *q, *n;
- struct list_head list;
+ LIST_HEAD(list);
/* Stop all interfaces & threads */
pktgen_exiting = true;
mutex_lock(&pktgen_thread_lock);
- list_splice(&list, &pktgen_threads);
+ list_splice_init(&pktgen_threads, &list);
mutex_unlock(&pktgen_thread_lock);
list_for_each_safe(q, n, &list) {