loop0: detected capacity change from 0 to 128 ================================================================== BUG: KCSAN: data-race in xas_clear_mark / xas_find_marked read-write to 0xffff8881061fe238 of 8 bytes by task 4518 on cpu 0: instrument_read_write include/linux/instrumented.h:55 [inline] __instrument_read_write_bitop include/asm-generic/bitops/instrumented-non-atomic.h:84 [inline] ___test_and_clear_bit include/asm-generic/bitops/instrumented-non-atomic.h:114 [inline] node_clear_mark lib/xarray.c:102 [inline] xas_clear_mark+0x90/0x180 lib/xarray.c:915 __folio_start_writeback+0x2fa/0x440 mm/page-writeback.c:3154 __mpage_writepage+0xbed/0xe10 fs/mpage.c:619 write_cache_pages+0x62/0x100 mm/page-writeback.c:2640 mpage_writepages+0x72/0xf0 fs/mpage.c:666 fat_writepages+0x24/0x30 fs/fat/inode.c:199 do_writepages+0x1d8/0x480 mm/page-writeback.c:2683 filemap_fdatawrite_wbc+0xdb/0x100 mm/filemap.c:398 __filemap_fdatawrite_range mm/filemap.c:431 [inline] filemap_write_and_wait_range+0xb9/0x2c0 mm/filemap.c:685 filemap_invalidate_pages+0xa5/0x1a0 mm/filemap.c:2745 kiocb_invalidate_pages mm/filemap.c:2764 [inline] generic_file_direct_write+0x9d/0x250 mm/filemap.c:3970 __generic_file_write_iter+0xae/0x120 mm/filemap.c:4141 generic_file_write_iter+0x77/0x1c0 mm/filemap.c:4181 aio_write+0x2f7/0x420 fs/aio.c:1633 io_submit_one+0xb0c/0x1230 fs/aio.c:2052 __do_sys_io_submit fs/aio.c:2111 [inline] __se_sys_io_submit+0xf5/0x280 fs/aio.c:2081 __x64_sys_io_submit+0x43/0x50 fs/aio.c:2081 x64_sys_call+0x1ebc/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:210 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffff8881061fe238 of 8 bytes by task 4512 on cpu 1: xas_find_chunk include/linux/xarray.h:1733 [inline] xas_find_marked+0x216/0x660 lib/xarray.c:1370 find_get_entry+0x54/0x390 mm/filemap.c:1994 filemap_get_folios_tag+0x136/0x210 mm/filemap.c:2261 writeback_get_folio mm/page-writeback.c:2489 [inline] writeback_iter+0x4b0/0x830 mm/page-writeback.c:2590 write_cache_pages+0x4b/0x100 mm/page-writeback.c:2639 mpage_writepages+0x72/0xf0 fs/mpage.c:666 fat_writepages+0x24/0x30 fs/fat/inode.c:199 do_writepages+0x1d8/0x480 mm/page-writeback.c:2683 filemap_fdatawrite_wbc+0xdb/0x100 mm/filemap.c:398 __filemap_fdatawrite_range mm/filemap.c:431 [inline] file_write_and_wait_range+0xc4/0x250 mm/filemap.c:788 __generic_file_fsync+0x46/0x140 fs/libfs.c:1528 fat_file_fsync+0x46/0x100 fs/fat/file.c:191 vfs_fsync_range+0x116/0x130 fs/sync.c:188 generic_write_sync include/linux/fs.h:2871 [inline] generic_file_write_iter+0x185/0x1c0 mm/filemap.c:4185 new_sync_write fs/read_write.c:590 [inline] vfs_write+0x77f/0x920 fs/read_write.c:683 ksys_write+0xeb/0x1b0 fs/read_write.c:736 __do_sys_write fs/read_write.c:748 [inline] __se_sys_write fs/read_write.c:745 [inline] __x64_sys_write+0x42/0x50 fs/read_write.c:745 x64_sys_call+0x27dd/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:2 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0xffffffffffffffff -> 0xfffffffffffffff0 Reported by Kernel Concurrency Sanitizer on: CPU: 1 UID: 0 PID: 4512 Comm: syz.0.235 Not tainted 6.12.0-rc5-syzkaller-00005-ge42b1a9a2557 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 ================================================================== syz.0.235: attempt to access beyond end of device loop0: rw=2049, sector=145, nr_sectors = 896 limit=128