================================================================== BUG: KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets write to 0xffff888117adfb28 of 4 bytes by task 3941 on cpu 1: wg_cpumask_next_online drivers/net/wireguard/queueing.h:130 [inline] wg_queue_enqueue_per_device_and_peer drivers/net/wireguard/queueing.h:173 [inline] wg_packet_create_data drivers/net/wireguard/send.c:320 [inline] wg_packet_send_staged_packets+0x6e5/0xac0 drivers/net/wireguard/send.c:388 wg_packet_send_keepalive+0xe2/0x100 drivers/net/wireguard/send.c:239 wg_receive_handshake_packet drivers/net/wireguard/receive.c:186 [inline] wg_packet_handshake_receive_worker+0x449/0x5f0 drivers/net/wireguard/receive.c:213 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3312 worker_thread+0x526/0x730 kernel/workqueue.c:3393 kthread+0x1d1/0x210 kernel/kthread.c:389 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 read to 0xffff888117adfb28 of 4 bytes by task 6334 on cpu 0: wg_cpumask_next_online drivers/net/wireguard/queueing.h:127 [inline] wg_queue_enqueue_per_device_and_peer drivers/net/wireguard/queueing.h:173 [inline] wg_packet_create_data drivers/net/wireguard/send.c:320 [inline] wg_packet_send_staged_packets+0x60e/0xac0 drivers/net/wireguard/send.c:388 wg_xmit+0x5c8/0x6a0 drivers/net/wireguard/device.c:218 __netdev_start_xmit include/linux/netdevice.h:4882 [inline] netdev_start_xmit include/linux/netdevice.h:4896 [inline] xmit_one net/core/dev.c:3578 [inline] dev_hard_start_xmit+0x119/0x3f0 net/core/dev.c:3594 __dev_queue_xmit+0xf83/0x1e50 net/core/dev.c:4393 dev_queue_xmit include/linux/netdevice.h:3095 [inline] __bpf_tx_skb net/core/filter.c:2139 [inline] __bpf_redirect_no_mac net/core/filter.c:2169 [inline] __bpf_redirect+0x705/0x950 net/core/filter.c:2192 ____bpf_clone_redirect net/core/filter.c:2462 [inline] bpf_clone_redirect+0x16c/0x1d0 net/core/filter.c:2434 ___bpf_prog_run+0x9ab/0x46c0 kernel/bpf/core.c:2012 __bpf_prog_run512+0x74/0xa0 kernel/bpf/core.c:2255 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] bpf_test_run+0x17d/0x430 net/bpf/test_run.c:425 bpf_prog_test_run_skb+0x73c/0x9b0 net/bpf/test_run.c:1066 bpf_prog_test_run+0x26d/0x3e0 kernel/bpf/syscall.c:4291 __sys_bpf+0x400/0x7a0 kernel/bpf/syscall.c:5705 __do_sys_bpf kernel/bpf/syscall.c:5794 [inline] __se_sys_bpf kernel/bpf/syscall.c:5792 [inline] __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5792 x64_sys_call+0x2655/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:322 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0x00000001 -> 0x00000000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 6334 Comm: syz-executor.1 Tainted: G W 6.10.0-rc2-syzkaller-00022-g32f88d65f01b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 ==================================================================