syzbot


KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue (8)

Status: auto-obsoleted due to no activity on 2023/10/19 10:00
Subsystems: block
[Documentation on labels]
First crash: 294d, last: 230d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue (5) block 1 568d 568d 0/26 auto-obsoleted due to no activity on 2022/11/15 22:27
upstream KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue (9) block 10 64d 146d 0/26 auto-obsoleted due to no activity on 2024/04/02 12:09
upstream KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue block 1 900d 900d 0/26 auto-closed as invalid on 2021/12/18 22:19
upstream KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue (6) block 2 514d 532d 0/26 auto-obsoleted due to no activity on 2023/01/16 12:50
upstream KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue (7) block 1 366d 366d 0/26 auto-obsoleted due to no activity on 2023/06/05 14:18
upstream KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue (3) block 1 780d 780d 0/26 auto-closed as invalid on 2022/04/17 09:14
upstream KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue (4) block 11 618d 739d 0/26 auto-closed as invalid on 2022/09/26 17:17
upstream KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue (2) block 4 830d 840d 0/26 auto-closed as invalid on 2022/02/26 09:45

Sample crash report:
==================================================================
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

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/09/14 09:54 upstream 23f108dc9ed2 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue
2023/09/04 10:10 upstream 708283abf896 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue
2023/08/23 23:29 upstream a5e505a99ca7 b81ca3f6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue
2023/08/14 21:38 upstream 2ccdd1b13c59 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue
2023/08/12 17:26 upstream f8de32cc060b 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue
2023/08/06 10:33 upstream f6a691685962 4ffcc9ef .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue
2023/07/12 14:30 upstream 3f01e9fed845 979d5fe2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue
* Struck through repros no longer work on HEAD.