================================================================== BUG: KCSAN: data-race in random_recv_done / virtio_read read to 0xffff88810123e0cc of 4 bytes by task 15589 on cpu 0: copy_data drivers/char/hw_random/virtio-rng.c:70 [inline] virtio_read+0xc2/0x450 drivers/char/hw_random/virtio-rng.c:92 rng_get_data drivers/char/hw_random/core.c:192 [inline] rng_dev_read+0x1b4/0x630 drivers/char/hw_random/core.c:229 do_loop_readv_writev fs/read_write.c:746 [inline] do_iter_read+0x370/0x5d0 fs/read_write.c:788 vfs_readv fs/read_write.c:906 [inline] do_preadv+0x159/0x240 fs/read_write.c:998 __do_sys_preadv fs/read_write.c:1048 [inline] __se_sys_preadv fs/read_write.c:1043 [inline] __x64_sys_preadv+0x54/0x60 fs/read_write.c:1043 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae write to 0xffff88810123e0cc 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:2165 __handle_irq_event_percpu+0x92/0x450 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0x7b/0x110 kernel/irq/handle.c:210 handle_edge_irq+0x18e/0x5f0 kernel/irq/chip.c:820 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+0x1e/0x40 __tsan_read8+0xe/0x180 kernel/kcsan/core.c:1014 avc_has_perm_noaudit+0x6b/0x270 security/selinux/avc.c:1152 selinux_inode_permission+0x2da/0x3f0 security/selinux/hooks.c:3155 security_inode_permission+0x72/0xc0 security/security.c:1317 inode_permission fs/namei.c:532 [inline] may_lookup fs/namei.c:1733 [inline] link_path_walk+0x1e2/0x990 fs/namei.c:2289 path_lookupat+0x8b/0x3d0 fs/namei.c:2498 filename_lookup+0x130/0x310 fs/namei.c:2528 user_path_at_empty+0x3e/0x110 fs/namei.c:2851 do_readlinkat+0x97/0x210 fs/stat.c:443 __do_sys_readlink fs/stat.c:476 [inline] __se_sys_readlink fs/stat.c:473 [inline] __x64_sys_readlink+0x43/0x50 fs/stat.c:473 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae value changed: 0x00000000 -> 0x00000040 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 1440 Comm: udevd Not tainted 5.17.0-rc4-syzkaller-00217-g7993e65fdd0f-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ================================================================== virtio_rng virtio3: input:id 0 is not a head!