==================================================================
BUG: KCSAN: data-race in __bio_queue_enter / blk_freeze_queue
read-write to 0xffff8881017354b4 of 4 bytes by task 4766 on cpu 1:
blk_freeze_queue_start block/blk-mq.c:126 [inline]
blk_freeze_queue+0x37/0xb0 block/blk-mq.c:165
blk_mq_freeze_queue+0x15/0x20 block/blk-mq.c:175
__loop_clr_fd+0x89/0x3b0 drivers/block/loop.c:1150
loop_clr_fd drivers/block/loop.c:1257 [inline]
lo_ioctl+0xe93/0x12e0 drivers/block/loop.c:1563
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 0xffff8881017354b4 of 4 bytes by task 10599 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]
filemap_write_and_wait_range+0xe6/0x220 mm/filemap.c:681
filemap_write_and_wait include/linux/pagemap.h:64 [inline]
sync_blockdev+0x42/0x50 block/bdev.c:198
bdev_disk_changed+0x10b/0xbd0 block/partitions/core.c:666
blkdev_get_whole+0x227/0x240 block/bdev.c:670
blkdev_get_by_dev+0x236/0x390 block/bdev.c:812
blkdev_open+0xf7/0x1e0 block/fops.c:518
do_dentry_open+0x5cd/0xaf0 fs/open.c:914
vfs_open+0x4a/0x50 fs/open.c:1048
do_open fs/namei.c:3636 [inline]
path_openat+0x17f2/0x1d10 fs/namei.c:3793
do_filp_open+0xf6/0x200 fs/namei.c:3820
do_sys_openat2+0xab/0x110 fs/open.c:1407
do_sys_open fs/open.c:1422 [inline]
__do_sys_openat fs/open.c:1438 [inline]
__se_sys_openat fs/open.c:1433 [inline]
__x64_sys_openat+0xf3/0x120 fs/open.c:1433
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: 0x00000000 -> 0x00000001
Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 10599 Comm: udevd Not tainted 6.5.0-rc7-syzkaller-00024-g93f5de5f648d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
==================================================================
I/O error, dev loop7, sector 7680 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 960, lost async page write
Buffer I/O error on dev loop7, logical block 1317, lost async page write
Buffer I/O error on dev loop7, logical block 1327, lost async page write
Buffer I/O error on dev loop7, logical block 1326, lost async page write
I/O error, dev loop7, sector 9480 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 1185, lost async page write
I/O error, dev loop7, sector 16128 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
I/O error, dev loop7, sector 16128 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 2016, async page read
I/O error, dev loop7, sector 16128 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
I/O error, dev loop7, sector 3208 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 401, lost async page write
I/O error, dev loop7, sector 11136 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 1392, lost async page write
Buffer I/O error on dev loop7, logical block 1056, lost async page write
I/O error, dev loop7, sector 9864 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 1233, lost async page write