================================================================== BUG: KCSAN: data-race in random_recv_done / virtio_read read to 0xffff8881019d20cc of 4 bytes by task 21440 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 vfs_read+0x1a1/0x6a0 fs/read_write.c:480 ksys_read+0xe8/0x1a0 fs/read_write.c:620 __do_sys_read fs/read_write.c:630 [inline] __se_sys_read fs/read_write.c:628 [inline] __x64_sys_read+0x3e/0x50 fs/read_write.c:628 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+0x46/0xb0 write to 0xffff8881019d20cc of 4 bytes by interrupt on cpu 1: random_recv_done+0x58/0x80 drivers/char/hw_random/virtio-rng.c:45 vring_interrupt+0x15d/0x180 drivers/virtio/virtio_ring.c:2148 __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:817 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+0x27/0x40 ip_vs_in_hook+0x2c2/0x10d0 net/netfilter/ipvs/ip_vs_core.c:1971 nf_hook_entry_hookfn include/linux/netfilter.h:142 [inline] nf_hook_slow+0x71/0x160 net/netfilter/core.c:620 nf_hook include/linux/netfilter.h:262 [inline] __ip_local_out+0x27d/0x2a0 net/ipv4/ip_output.c:115 ip_local_out net/ipv4/ip_output.c:124 [inline] ip_send_skb+0x2c/0xe0 net/ipv4/ip_output.c:1571 udp_send_skb+0x626/0x860 net/ipv4/udp.c:967 udp_sendmsg+0x114b/0x1200 net/ipv4/udp.c:1254 inet_sendmsg+0x5f/0x80 net/ipv4/af_inet.c:819 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] ____sys_sendmsg+0x38f/0x500 net/socket.c:2492 ___sys_sendmsg net/socket.c:2546 [inline] __sys_sendmmsg+0x27c/0x4a0 net/socket.c:2632 __do_sys_sendmmsg net/socket.c:2661 [inline] __se_sys_sendmmsg net/socket.c:2658 [inline] __x64_sys_sendmmsg+0x53/0x60 net/socket.c:2658 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+0x46/0xb0 value changed: 0x00000000 -> 0x00000040 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 21430 Comm: syz-executor.3 Tainted: G W 5.18.0-syzkaller-12234-g50fd82b3a9a9-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ================================================================== virtio_rng virtio3: input:id 1 is not a head!