================================================================== BUG: KCSAN: data-race in __xa_clear_mark / xas_find_marked read-write to 0xffff8881063bab50 of 8 bytes by interrupt on cpu 1: 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 lib/xarray.c:922 [inline] __xa_clear_mark+0x103/0x1f0 lib/xarray.c:2094 __folio_end_writeback+0x18d/0x4a0 mm/page-writeback.c:3047 folio_end_writeback+0xcd/0x3d0 mm/filemap.c:1648 end_buffer_async_write+0x1ca/0x230 fs/buffer.c:409 end_bio_bh_io_sync+0x76/0xa0 fs/buffer.c:2748 bio_endio+0x369/0x410 block/bio.c:1551 blk_update_request+0x368/0x870 block/blk-mq.c:983 blk_mq_end_request+0x26/0x50 block/blk-mq.c:1145 lo_complete_rq+0x98/0x140 drivers/block/loop.c:304 blk_complete_reqs block/blk-mq.c:1220 [inline] blk_done_softirq+0x74/0xb0 block/blk-mq.c:1225 handle_softirqs+0xbf/0x280 kernel/softirq.c:579 do_softirq+0x62/0xa0 kernel/softirq.c:480 __local_bh_enable_ip+0x6e/0x70 kernel/softirq.c:407 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:167 [inline] _raw_spin_unlock_bh+0x36/0x40 kernel/locking/spinlock.c:210 spin_unlock_bh include/linux/spinlock.h:396 [inline] lock_sock_nested+0x114/0x140 net/core/sock.c:3709 lock_sock include/net/sock.h:1651 [inline] tcp_recvmsg+0x123/0x490 net/ipv4/tcp.c:2877 inet_recvmsg+0xc0/0x2a0 net/ipv4/af_inet.c:883 sock_recvmsg_nosec net/socket.c:1017 [inline] sock_recvmsg+0xfe/0x170 net/socket.c:1039 sock_read_iter+0x14f/0x1a0 net/socket.c:1109 new_sync_read fs/read_write.c:489 [inline] vfs_read+0x5e6/0x710 fs/read_write.c:570 ksys_read+0xeb/0x1b0 fs/read_write.c:713 __do_sys_read fs/read_write.c:722 [inline] __se_sys_read fs/read_write.c:720 [inline] __x64_sys_read+0x42/0x50 fs/read_write.c:720 x64_sys_call+0x2a3b/0x2e10 arch/x86/include/generated/asm/syscalls_64.h:1 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xc9/0x1a0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffff8881063bab50 of 8 bytes by task 9651 on cpu 0: xas_find_chunk include/linux/xarray.h:1746 [inline] xas_find_marked+0x21d/0x660 lib/xarray.c:1510 find_get_entry+0x5d/0x370 mm/filemap.c:2027 filemap_get_folios_tag+0x13e/0x220 mm/filemap.c:2295 __filemap_fdatawait_range mm/filemap.c:530 [inline] filemap_write_and_wait_range+0x1e3/0x370 mm/filemap.c:700 filemap_write_and_wait include/linux/pagemap.h:68 [inline] sync_blockdev+0x35/0x50 block/bdev.c:222 loop_set_status+0x119/0x5d0 drivers/block/loop.c:1210 lo_ioctl+0x81a/0x15e0 drivers/block/loop.c:-1 blkdev_ioctl+0x35b/0x450 block/ioctl.c:698 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xc9/0x140 fs/ioctl.c:892 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:892 x64_sys_call+0x168d/0x2e10 arch/x86/include/generated/asm/syscalls_64.h:17 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xc9/0x1a0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0xfffffffffffff000 -> 0xfffffffffff00000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 UID: 0 PID: 9651 Comm: syz.3.2625 Not tainted 6.15.0-rc3-syzkaller-00019-gbc3372351d0c #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 ================================================================== loop7: detected capacity change from 16384 to 16383