================================================================== BUG: KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue read-write to 0xffff8881003982e4 of 4 bytes by task 6719 on cpu 1: __blk_mq_unfreeze_queue block/blk-mq.c:184 [inline] blk_mq_unfreeze_queue+0x38/0xc0 block/blk-mq.c:195 loop_set_block_size drivers/block/loop.c:1501 [inline] lo_simple_ioctl drivers/block/loop.c:1522 [inline] lo_ioctl+0xe27/0x12e0 drivers/block/loop.c:1585 blkdev_ioctl+0x375/0x460 block/ioctl.c:621 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xcf/0x140 fs/ioctl.c:856 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff8881003982e4 of 4 bytes by task 6692 on cpu 0: __bio_queue_enter+0x1e3/0x4f0 block/blk-core.c:357 bio_queue_enter block/blk.h:71 [inline] blk_mq_get_new_requests block/blk-mq.c:2877 [inline] blk_mq_submit_bio+0x359/0xd70 block/blk-mq.c:2988 __submit_bio+0x11c/0x350 block/blk-core.c:598 __submit_bio_noacct_mq block/blk-core.c:677 [inline] submit_bio_noacct_nocheck+0x449/0x5e0 block/blk-core.c:706 submit_bio_noacct+0x700/0x8a0 block/blk-core.c:800 submit_bio+0xb7/0xc0 block/blk-core.c:833 submit_bh_wbc+0x270/0x2b0 fs/buffer.c:2840 __block_write_full_folio+0x567/0x8b0 fs/buffer.c:1928 block_write_full_page+0x302/0x3c0 blkdev_writepage+0x24/0x30 block/fops.c:392 writepage_cb+0x3c/0xd0 mm/page-writeback.c:2537 write_cache_pages+0x39d/0x750 mm/page-writeback.c:2474 do_writepages+0x212/0x340 mm/page-writeback.c:2558 filemap_fdatawrite_wbc+0xdb/0xf0 mm/filemap.c:393 __filemap_fdatawrite_range mm/filemap.c:426 [inline] file_write_and_wait_range+0xfa/0x190 mm/filemap.c:784 blkdev_fsync+0x4e/0xa0 block/fops.c:458 vfs_fsync_range+0x111/0x120 fs/sync.c:188 generic_write_sync include/linux/fs.h:2499 [inline] blkdev_write_iter+0x375/0x3c0 block/fops.c:575 do_iter_write+0x4b4/0x7b0 fs/read_write.c:860 vfs_iter_write+0x56/0x70 fs/read_write.c:901 iter_file_splice_write+0x462/0x7e0 fs/splice.c:739 do_splice_from fs/splice.c:936 [inline] direct_splice_actor+0x8a/0xb0 fs/splice.c:1145 splice_direct_to_actor+0x31d/0x690 fs/splice.c:1091 do_splice_direct+0x10d/0x190 fs/splice.c:1197 do_sendfile+0x3b6/0x9a0 fs/read_write.c:1254 __do_sys_sendfile64 fs/read_write.c:1322 [inline] __se_sys_sendfile64 fs/read_write.c:1308 [inline] __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1308 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x00000001 -> 0x00000000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 6692 Comm: syz-executor.3 Not tainted 6.5.0-rc7-syzkaller-00022-ga5e505a99ca7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 ================================================================== Buffer I/O error on dev loop0, logical block 479, lost async page write syz-executor.3 (6692) used greatest stack depth: 9600 bytes left