================================================================== BUG: KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue read-write to 0xffff8881011f4d94 of 4 bytes by task 3110 on cpu 0: __blk_mq_unfreeze_queue block/blk-mq.c:185 [inline] blk_mq_unfreeze_queue+0x38/0xc0 block/blk-mq.c:196 __loop_clr_fd+0x234/0x3b0 drivers/block/loop.c:1172 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:630 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl+0xcf/0x140 fs/ioctl.c:857 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:857 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 0xffff8881011f4d94 of 4 bytes by task 2777 on cpu 1: __bio_queue_enter+0x1e3/0x4f0 block/blk-core.c:358 bio_queue_enter block/blk.h:70 [inline] blk_mq_get_new_requests block/blk-mq.c:2878 [inline] blk_mq_submit_bio+0x359/0xd70 block/blk-mq.c:2989 __submit_bio+0x11c/0x350 block/blk-core.c:599 __submit_bio_noacct_mq block/blk-core.c:678 [inline] submit_bio_noacct_nocheck+0x449/0x5e0 block/blk-core.c:707 submit_bio_noacct+0x700/0x8a0 block/blk-core.c:801 submit_bio+0xb7/0xc0 block/blk-core.c:834 submit_bh_wbc+0x270/0x2b0 fs/buffer.c:2814 submit_bh fs/buffer.c:2819 [inline] block_read_full_folio+0x63d/0x710 fs/buffer.c:2442 blkdev_read_folio+0x1c/0x20 block/fops.c:420 filemap_read_folio mm/filemap.c:2382 [inline] do_read_cache_folio+0x102/0x450 mm/filemap.c:3715 read_cache_folio+0x3a/0x50 mm/filemap.c:3747 read_mapping_folio include/linux/pagemap.h:866 [inline] read_part_sector+0x7b/0x140 block/partitions/core.c:714 read_lba block/partitions/efi.c:248 [inline] find_valid_gpt block/partitions/efi.c:603 [inline] efi_partition+0x256/0x1270 block/partitions/efi.c:720 check_partition block/partitions/core.c:138 [inline] blk_add_partitions block/partitions/core.c:596 [inline] bdev_disk_changed+0x3fa/0xbd0 block/partitions/core.c:685 blkdev_get_whole+0x227/0x240 block/bdev.c:653 blkdev_get_by_dev+0x236/0x390 block/bdev.c:795 disk_scan_partitions+0x13b/0x1a0 block/genhd.c:369 blkdev_common_ioctl+0xd59/0x1680 block/ioctl.c:555 blkdev_ioctl+0x318/0x460 block/ioctl.c:624 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl+0xcf/0x140 fs/ioctl.c:857 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:857 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: 1 PID: 2777 Comm: udevd Not tainted 6.6.0-rc1-syzkaller-00070-g23f108dc9ed2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 ================================================================== 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 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 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