Commit 979b581
pktgen: use cpus_read_lock() in pg_net_init()
I have seen the WARN_ON(smp_processor_id() != cpu) firing
in pktgen_thread_worker() during tests.
We must use cpus_read_lock()/cpus_read_unlock()
around the for_each_online_cpu(cpu) loop.
While we are at it use WARN_ON_ONCE() to avoid a possible syslog flood.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20240821175339.1191779-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent aa0743a commit 979b581
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3654 | 3654 | | |
3655 | 3655 | | |
3656 | 3656 | | |
3657 | | - | |
| 3657 | + | |
3658 | 3658 | | |
3659 | 3659 | | |
3660 | 3660 | | |
| |||
3989 | 3989 | | |
3990 | 3990 | | |
3991 | 3991 | | |
| 3992 | + | |
3992 | 3993 | | |
3993 | 3994 | | |
3994 | 3995 | | |
| |||
3997 | 3998 | | |
3998 | 3999 | | |
3999 | 4000 | | |
| 4001 | + | |
4000 | 4002 | | |
4001 | 4003 | | |
4002 | 4004 | | |
| |||
0 commit comments