syzbot


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

Status: auto-obsoleted due to no activity on 2023/06/05 14:18
Subsystems: block
[Documentation on labels]
First crash: 366d, last: 366d
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 (3) block 1 781d 781d 0/26 auto-closed as invalid on 2022/04/17 09:14
upstream KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue (8) block 7 230d 294d 0/26 auto-obsoleted due to no activity on 2023/10/19 10:00
upstream KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue (4) block 11 618d 740d 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:
Alternate GPT is invalid, using primary GPT.
 loop4: p2 p3 p7
==================================================================
BUG: KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue

read-write to 0xffff888101b33734 of 4 bytes by task 3069 on cpu 0:
 __blk_mq_unfreeze_queue block/blk-mq.c:191 [inline]
 blk_mq_unfreeze_queue+0x38/0xc0 block/blk-mq.c:202
 __loop_clr_fd+0x22e/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+0x38e/0x480 block/ioctl.c:615
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xc9/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 0xffff888101b33734 of 4 bytes by task 2746 on cpu 1:
 __bio_queue_enter+0x1e0/0x4f0 block/blk-core.c:354
 bio_queue_enter block/blk.h:71 [inline]
 blk_mq_get_new_requests block/blk-mq.c:2844 [inline]
 blk_mq_submit_bio+0x390/0xe40 block/blk-mq.c:2954
 __submit_bio+0x116/0x350 block/blk-core.c:594
 __submit_bio_noacct_mq block/blk-core.c:673 [inline]
 submit_bio_noacct_nocheck+0x449/0x5e0 block/blk-core.c:702
 submit_bio_noacct+0x75d/0x8f0 block/blk-core.c:801
 submit_bio+0xb7/0xc0 block/blk-core.c:834
 submit_bh_wbc+0x2b1/0x2f0 fs/buffer.c:2777
 submit_bh fs/buffer.c:2782 [inline]
 block_read_full_folio+0x647/0x720 fs/buffer.c:2403
 blkdev_read_folio+0x1c/0x20 block/fops.c:396
 filemap_read_folio mm/filemap.c:2421 [inline]
 do_read_cache_folio+0x108/0x450 mm/filemap.c:3680
 read_cache_folio+0x3a/0x50 mm/filemap.c:3712
 read_mapping_folio include/linux/pagemap.h:778 [inline]
 read_part_sector+0x7b/0x140 block/partitions/core.c:717
 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:146 [inline]
 blk_add_partitions block/partitions/core.c:602 [inline]
 bdev_disk_changed+0x3e1/0xbb0 block/partitions/core.c:688
 blkdev_get_whole+0x227/0x240 block/bdev.c:608
 blkdev_get_by_dev+0x23d/0x640 block/bdev.c:745
 disk_scan_partitions+0x140/0x1a0 block/genhd.c:384
 blkdev_common_ioctl+0xda5/0x1450 block/ioctl.c:531
 blkdev_ioctl+0x331/0x480 block/ioctl.c:609
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xc9/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

value changed: 0x00000001 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 2746 Comm: udevd Not tainted 6.3.0-syzkaller-12049-g58390c8ce1bd #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
==================================================================
I/O error, dev loop2, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop2, logical block 0, async page read
 loop2: unable to read partition table
loop2: partition table beyond EOD, truncated
Alternate GPT is invalid, using primary GPT.
 loop4: p2 p3 p7
Alternate GPT is invalid, using primary GPT.
 loop2: p2 p3 p7
Alternate GPT is invalid, using primary GPT.
 loop4: p2 p3 p7
Alternate GPT is invalid, using primary GPT.
 loop4: p2 p3 p7
Alternate GPT is invalid, using primary GPT.
 loop2: p2 p3 p7
Alternate GPT is invalid, using primary GPT.
 loop4: p2 p3 p7
Alternate GPT is invalid, using primary GPT.
 loop4: p2 p3 p7
blk_print_req_error: 3 callbacks suppressed
I/O error, dev loop2, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop2, logical block 0, async page read
 loop2: unable to read partition table
loop2: partition table beyond EOD, truncated
Alternate GPT is invalid, using primary GPT.
 loop3: p2 p3 p7
Alternate GPT is invalid, using primary GPT.
 loop4: p2 p3 p7
Alternate GPT is invalid, using primary GPT.
 loop4: p2 p3 p7
I/O error, dev loop2, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop2, logical block 0, async page read
 loop2: unable to read partition table
loop2: partition table beyond EOD, truncated
Alternate GPT is invalid, using primary GPT.
 loop2: p2 p3 p7
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop4, logical block 0, async page read
 loop4: unable to read partition table
loop4: partition table beyond EOD, truncated
Alternate GPT is invalid, using primary GPT.
 loop2: p2 p3 p7
Alternate GPT is invalid, using primary GPT.
 loop2: p2 p3 p7
Alternate GPT is invalid, using primary GPT.
 loop2: p2 p3 p7
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop4, logical block 0, async page read
 loop4: unable to read partition table
loop4: partition table beyond EOD, truncated
I/O error, dev loop2, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop2, logical block 0, async page read
 loop2: unable to read partition table
loop2: partition table beyond EOD, truncated
Alternate GPT is invalid, using primary GPT.
 loop4: p2 p3 p7
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop4, logical block 0, async page read
 loop4: unable to read partition table
loop4: partition table beyond EOD, truncated
Alternate GPT is invalid, using primary GPT.
 loop4: p2 p3 p7
Alternate GPT is invalid, using primary GPT.
 loop3: p2 p3 p7
Alternate GPT is invalid, using primary GPT.
 loop4: p2 p3 p7
Alternate GPT is invalid, using primary GPT.
 loop2: p2 p3 p7

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/01 14:11 upstream 58390c8ce1bd 62df2017 .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.