================================================================== BUG: KCSAN: data-race in filemap_write_and_wait_range / page_cache_delete read-write to 0xffff888101657c48 of 8 bytes by task 6003 on cpu 1: page_cache_delete+0x35d/0x390 mm/filemap.c:145 __filemap_remove_folio+0x3b/0xf0 mm/filemap.c:223 __remove_mapping+0x42a/0x530 mm/vmscan.c:1366 remove_mapping+0x1f/0x140 mm/vmscan.c:1399 mapping_evict_folio mm/truncate.c:282 [inline] invalidate_mapping_pagevec+0x44d/0x5d0 mm/truncate.c:528 invalidate_mapping_pages+0x23/0x30 mm/truncate.c:567 invalidate_bdev block/bdev.c:86 [inline] __invalidate_device+0xa9/0xc0 block/bdev.c:1016 disk_force_media_change+0x110/0x180 block/disk-events.c:310 loop_configure+0x730/0xc30 drivers/block/loop.c:1065 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+0x63/0xcd read to 0xffff888101657c48 of 8 bytes by task 5666 on cpu 0: mapping_needs_writeback mm/filemap.c:627 [inline] filemap_write_and_wait_range+0x34/0x1d0 mm/filemap.c:672 filemap_write_and_wait include/linux/pagemap.h:60 [inline] sync_blockdev+0x3e/0x50 block/bdev.c:197 bdev_disk_changed+0xe0/0xc30 block/partitions/core.c:664 blkdev_get_whole+0x256/0x270 block/bdev.c:684 blkdev_get_by_dev+0x248/0x650 block/bdev.c:821 blkdev_open+0xac/0x140 block/fops.c:485 do_dentry_open+0x51a/0x8b0 fs/open.c:878 vfs_open+0x43/0x50 fs/open.c:1014 do_open fs/namei.c:3557 [inline] path_openat+0x169d/0x1b00 fs/namei.c:3691 do_filp_open+0x105/0x220 fs/namei.c:3718 do_sys_openat2+0xb5/0x2a0 fs/open.c:1311 do_sys_open fs/open.c:1327 [inline] __do_sys_openat fs/open.c:1343 [inline] __se_sys_openat fs/open.c:1338 [inline] __x64_sys_openat+0xef/0x110 fs/open.c:1338 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: 0x0000000000000001 -> 0x0000000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 5666 Comm: udevd Not tainted 6.0.0-rc1-syzkaller-00340-g50cd95ac4654-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 ================================================================== I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 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