diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-09-03 07:42:58 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-09-03 07:42:58 +0200 |
commit | 35f4a629641b812e04fadef087da5d6af59e32d7 (patch) | |
tree | 9cd5010ed6c0bf18cb631e60149a16ecccd9e0f3 /net/core/pktgen.c | |
parent | fc88bb11617978fb3fcfcc697fd5c9d2dae9c4a3 (diff) | |
parent | 431c1646e1f86b949fa3685efc50b660a364c2b6 (diff) |
Merge 6.11-rc6 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r-- | net/core/pktgen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index ea55a758a475..197a50ef8e2e 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -3654,7 +3654,7 @@ static int pktgen_thread_worker(void *arg) struct pktgen_dev *pkt_dev = NULL; int cpu = t->cpu; - WARN_ON(smp_processor_id() != cpu); + WARN_ON_ONCE(smp_processor_id() != cpu); init_waitqueue_head(&t->queue); complete(&t->start_done); @@ -3989,6 +3989,7 @@ static int __net_init pg_net_init(struct net *net) goto remove; } + cpus_read_lock(); for_each_online_cpu(cpu) { int err; @@ -3997,6 +3998,7 @@ static int __net_init pg_net_init(struct net *net) pr_warn("Cannot create thread for cpu %d (%d)\n", cpu, err); } + cpus_read_unlock(); if (list_empty(&pn->pktgen_threads)) { pr_err("Initialization failed for all threads\n"); |