================================================================== BUG: KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify write to 0xffff8881027b06c8 of 8 bytes by task 3004 on cpu 1: set_capacity block/genhd.c:64 [inline] set_capacity_and_notify+0xab/0x1d0 block/genhd.c:78 loop_set_size+0x2e/0x70 drivers/block/loop.c:237 loop_configure+0xb1b/0xc20 drivers/block/loop.c:1095 lo_ioctl+0x641/0x1290 blkdev_ioctl+0x20e/0x440 block/ioctl.c:614 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+0x46/0xb0 read to 0xffff8881027b06c8 of 8 bytes by task 2208 on cpu 0: bdev_nr_sectors include/linux/blkdev.h:793 [inline] get_capacity include/linux/blkdev.h:803 [inline] bdev_disk_changed+0x1b9/0xc30 block/partitions/core.c:685 blkdev_get_whole block/bdev.c:686 [inline] blkdev_get_by_dev+0x3c0/0x9c0 block/bdev.c:823 blkdev_open+0xac/0x140 block/fops.c:481 do_dentry_open+0x521/0x850 fs/open.c:848 vfs_open+0x43/0x50 fs/open.c:981 do_open fs/namei.c:3520 [inline] path_openat+0x16cf/0x1b30 fs/namei.c:3653 do_filp_open+0x105/0x220 fs/namei.c:3680 do_sys_openat2+0xb5/0x2a0 fs/open.c:1278 do_sys_open fs/open.c:1294 [inline] __do_sys_openat fs/open.c:1310 [inline] __se_sys_openat fs/open.c:1305 [inline] __x64_sys_openat+0xef/0x110 fs/open.c:1305 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: 0x0000000000000000 -> 0x0000000000000001 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 2208 Comm: udevd Not tainted 5.19.0-rc2-syzkaller-00060-g30306f6194ca-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ================================================================== I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 Buffer I/O error on dev loop3, logical block 0, async page read loop3: unable to read partition table loop3: partition table beyond EOD, truncated I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 Buffer I/O error on dev loop3, logical block 0, async page read loop3: unable to read partition table loop3: partition table beyond EOD, truncated I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 Buffer I/O error on dev loop3, logical block 0, async page read loop3: unable to read partition table loop3: partition table beyond EOD, truncated I/O error, dev loop0, sector 264064 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 I/O error, dev loop0, sector 264064 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 Buffer I/O error on dev loop3, logical block 0, async page read loop3: unable to read partition table loop3: partition table beyond EOD, truncated I/O error, dev loop3, sector 134912 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 udevd[2208]: inotify_add_watch(7, /dev/loop3p3, 10) failed: No such file or directory loop3: p1 < > p3 p4 loop3: partition table partially beyond EOD, truncated loop3: p1 start 889389056 is beyond EOD, truncated loop3: p4 size 2097154 extends beyond EOD, truncated I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 Buffer I/O error on dev loop3, logical block 0, async page read loop3: unable to read partition table loop3: partition table beyond EOD, truncated