================================================================== BUG: KCSAN: data-race in blkdev_read_iter / set_capacity_and_notify write to 0xffff888100405048 of 8 bytes by task 31323 on cpu 0: set_capacity block/genhd.c:64 [inline] set_capacity_and_notify+0xab/0x1d0 block/genhd.c:78 loop_set_size drivers/block/loop.c:233 [inline] loop_configure+0xd53/0xf50 drivers/block/loop.c:1059 lo_ioctl+0x633/0x1260 blkdev_ioctl+0x20e/0x440 block/ioctl.c:588 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:856 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:856 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+0x44/0xae read to 0xffff888100405048 of 8 bytes by task 22041 on cpu 1: bdev_nr_sectors include/linux/blkdev.h:786 [inline] bdev_nr_bytes include/linux/blkdev.h:791 [inline] blkdev_read_iter+0x40/0x380 block/fops.c:567 call_read_iter include/linux/fs.h:2075 [inline] new_sync_read fs/read_write.c:401 [inline] vfs_read+0x66c/0x750 fs/read_write.c:482 ksys_read+0xd9/0x190 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+0x44/0xae value changed: 0x0000000000000000 -> 0x0000000000000007 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 22041 Comm: udevd Not tainted 5.17.0-syzkaller-02003-g3bf03b9a0839-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ================================================================== I/O error, dev loop4, sector 264064 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0