================================================================== BUG: KCSAN: data-race in wg_packet_send_staged_packets / wg_packet_send_staged_packets write to 0xffff888102072a08 of 4 bytes by interrupt on cpu 1: wg_cpumask_next_online drivers/net/wireguard/queueing.h:141 [inline] wg_queue_enqueue_per_device_and_peer drivers/net/wireguard/queueing.h:160 [inline] wg_packet_create_data drivers/net/wireguard/send.c:321 [inline] wg_packet_send_staged_packets+0x8dd/0xd90 drivers/net/wireguard/send.c:393 wg_packet_send_keepalive+0x3f/0x140 drivers/net/wireguard/send.c:237 wg_expired_send_persistent_keepalive+0x43/0x50 drivers/net/wireguard/timers.c:141 call_timer_fn+0x58/0x2e0 kernel/time/timer.c:1405 expire_timers kernel/time/timer.c:1450 [inline] __run_timers kernel/time/timer.c:1774 [inline] __run_timers kernel/time/timer.c:1741 [inline] run_timer_softirq+0xb14/0xbd0 kernel/time/timer.c:1787 __do_softirq+0x118/0x34a kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0xb5/0xd0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:546 [inline] smp_apic_timer_interrupt+0xe2/0x270 arch/x86/kernel/apic/apic.c:1140 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 arch_local_irq_restore arch/x86/include/asm/paravirt.h:759 [inline] rmqueue_pcplist mm/page_alloc.c:3313 [inline] rmqueue mm/page_alloc.c:3330 [inline] get_page_from_freelist+0x280/0x17c0 mm/page_alloc.c:3750 __alloc_pages_nodemask+0x158/0x300 mm/page_alloc.c:4803 alloc_pages_current+0xca/0x170 mm/mempolicy.c:2295 alloc_pages include/linux/gfp.h:540 [inline] __page_cache_alloc mm/filemap.c:959 [inline] __page_cache_alloc+0x17f/0x1a0 mm/filemap.c:944 pagecache_get_page+0x251/0x8c0 mm/filemap.c:1645 grab_cache_page_write_begin+0x56/0x80 mm/filemap.c:3252 ext4_da_write_begin+0x1b4/0xa10 fs/ext4/inode.c:2964 generic_perform_write+0x13a/0x320 mm/filemap.c:3302 ext4_buffered_write_iter+0x14e/0x280 fs/ext4/file.c:270 ext4_file_write_iter+0xf4/0xd30 fs/ext4/file.c:642 call_write_iter include/linux/fs.h:1907 [inline] new_sync_write+0x303/0x400 fs/read_write.c:484 __vfs_write+0x9e/0xb0 fs/read_write.c:497 vfs_write fs/read_write.c:559 [inline] vfs_write+0x189/0x380 fs/read_write.c:543 ksys_write+0xc5/0x1a0 fs/read_write.c:612 __do_sys_write fs/read_write.c:624 [inline] __se_sys_write fs/read_write.c:621 [inline] __x64_sys_write+0x49/0x60 fs/read_write.c:621 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x44/0xa9 read to 0xffff888102072a08 of 4 bytes by interrupt on cpu 0: wg_cpumask_next_online drivers/net/wireguard/queueing.h:137 [inline] wg_queue_enqueue_per_device_and_peer drivers/net/wireguard/queueing.h:160 [inline] wg_packet_create_data drivers/net/wireguard/send.c:321 [inline] wg_packet_send_staged_packets+0x88c/0xd90 drivers/net/wireguard/send.c:393 wg_packet_send_keepalive+0x3f/0x140 drivers/net/wireguard/send.c:237 wg_expired_send_persistent_keepalive+0x43/0x50 drivers/net/wireguard/timers.c:141 call_timer_fn+0x58/0x2e0 kernel/time/timer.c:1405 expire_timers kernel/time/timer.c:1450 [inline] __run_timers kernel/time/timer.c:1774 [inline] __run_timers kernel/time/timer.c:1741 [inline] run_timer_softirq+0xb14/0xbd0 kernel/time/timer.c:1787 __do_softirq+0x118/0x34a kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0xb5/0xd0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:546 [inline] smp_apic_timer_interrupt+0xe2/0x270 arch/x86/kernel/apic/apic.c:1140 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 find_watchpoint kernel/kcsan/core.c:116 [inline] check_access kernel/kcsan/core.c:566 [inline] __tsan_unaligned_write8+0x68/0x110 kernel/kcsan/core.c:770 handle_mounts fs/namei.c:1353 [inline] step_into+0x5a/0x1090 fs/namei.c:1676 walk_component+0xde/0x390 fs/namei.c:1852 link_path_walk.part.0+0x469/0x700 fs/namei.c:2169 link_path_walk fs/namei.c:2292 [inline] path_lookupat.isra.0+0x75/0x350 fs/namei.c:2318 filename_lookup+0x145/0x2c0 fs/namei.c:2352 user_path_at_empty+0x47/0x60 fs/namei.c:2632 do_readlinkat+0x89/0x230 fs/stat.c:409 __do_sys_readlink fs/stat.c:442 [inline] __se_sys_readlink fs/stat.c:439 [inline] __x64_sys_readlink+0x4c/0x60 fs/stat.c:439 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 1 Comm: systemd Not tainted 5.7.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ==================================================================