================================================================== BUG: KCSAN: data-race in random_recv_done / virtio_read read to 0xffff8881012f24cc of 4 bytes by task 23173 on cpu 0: copy_data drivers/char/hw_random/virtio-rng.c:70 [inline] virtio_read+0xc2/0x430 drivers/char/hw_random/virtio-rng.c:92 rng_get_data drivers/char/hw_random/core.c:191 [inline] rng_dev_read+0x1b4/0x630 drivers/char/hw_random/core.c:228 do_iter_read+0x2d5/0x760 fs/read_write.c:798 vfs_readv fs/read_write.c:916 [inline] do_preadv+0x159/0x230 fs/read_write.c:1008 __do_sys_preadv fs/read_write.c:1058 [inline] __se_sys_preadv fs/read_write.c:1053 [inline] __x64_sys_preadv+0x54/0x60 fs/read_write.c:1053 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd write to 0xffff8881012f24cc of 4 bytes by interrupt on cpu 1: random_recv_done+0x58/0x80 drivers/char/hw_random/virtio-rng.c:45 vring_interrupt+0x14c/0x170 drivers/virtio/virtio_ring.c:2462 __handle_irq_event_percpu+0x92/0x400 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0x60/0xf0 kernel/irq/handle.c:210 handle_edge_irq+0x17e/0x5a0 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:231 [inline] __common_interrupt+0x60/0x100 arch/x86/kernel/irq.c:250 common_interrupt+0x9a/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:640 check_kcov_mode kernel/kcov.c:168 [inline] write_comp_data kernel/kcov.c:229 [inline] __sanitizer_cov_trace_const_cmp8+0x33/0xa0 kernel/kcov.c:304 _compound_head include/linux/page-flags.h:255 [inline] PageSwapBacked include/linux/page-flags.h:502 [inline] mm_counter_file include/linux/mm.h:1997 [inline] mm_counter include/linux/mm.h:2006 [inline] copy_present_pte+0x188/0xa70 mm/memory.c:970 copy_pte_range+0x3ed/0xc50 mm/memory.c:1085 copy_pmd_range mm/memory.c:1171 [inline] copy_pud_range mm/memory.c:1208 [inline] copy_p4d_range mm/memory.c:1232 [inline] copy_page_range+0x5ea/0x8f0 mm/memory.c:1330 dup_mmap+0x6e0/0xa60 kernel/fork.c:699 dup_mm+0x7c/0x210 kernel/fork.c:1525 copy_mm+0xce/0x140 kernel/fork.c:1577 copy_process+0xdc8/0x20e0 kernel/fork.c:2254 kernel_clone+0x163/0x5c0 kernel/fork.c:2671 __do_sys_clone kernel/fork.c:2805 [inline] __se_sys_clone kernel/fork.c:2789 [inline] __x64_sys_clone+0xc3/0xf0 kernel/fork.c:2789 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x00000000 -> 0x00000040 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 1842 Comm: syz-executor.3 Not tainted 6.0.0-syzkaller-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 ==================================================================