syzbot


KCSAN: data-race in __bio_queue_enter / blk_freeze_queue

Status: auto-obsoleted due to no activity on 2023/05/24 21:11
Subsystems: block
[Documentation on labels]
First crash: 649d, last: 649d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __bio_queue_enter / blk_freeze_queue (4) block 1 434d 413d 0/28 auto-obsoleted due to no activity on 2023/12/26 00:02
upstream KCSAN: data-race in __bio_queue_enter / blk_freeze_queue (2) block 1 522d 521d 0/28 auto-obsoleted due to no activity on 2023/09/29 03:06
upstream KCSAN: data-race in __bio_queue_enter / blk_freeze_queue (3) block 1 486d 486d 0/28 auto-obsoleted due to no activity on 2023/11/03 19:22

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __bio_queue_enter / blk_freeze_queue

read-write to 0xffff888100d53ecc of 4 bytes by task 28167 on cpu 1:
 blk_freeze_queue_start block/blk-mq.c:167 [inline]
 blk_freeze_queue+0x37/0xb0 block/blk-mq.c:206
 blk_mq_freeze_queue+0x15/0x20 block/blk-mq.c:216
 loop_set_status+0x135/0x540 drivers/block/loop.c:1285
 lo_ioctl+0x898/0x12f0
 blkdev_ioctl+0x3a0/0x490 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 0xffff888100d53ecc of 4 bytes by task 2746 on cpu 0:
 __bio_queue_enter+0x1e6/0x500 block/blk-core.c:360
 bio_queue_enter block/blk.h:71 [inline]
 blk_mq_get_new_requests block/blk-mq.c:2848 [inline]
 blk_mq_submit_bio+0x3ea/0xe10 block/blk-mq.c:2958
 __submit_bio+0x130/0x360 block/blk-core.c:602
 __submit_bio_noacct_mq block/blk-core.c:679 [inline]
 submit_bio_noacct_nocheck+0x469/0x600 block/blk-core.c:708
 submit_bio_noacct+0x76f/0x900 block/blk-core.c:807
 submit_bio+0x101/0x110 block/blk-core.c:843
 submit_bh_wbc+0x2b1/0x2f0 fs/buffer.c:2750
 submit_bh fs/buffer.c:2755 [inline]
 block_read_full_folio+0x5e6/0x6b0 fs/buffer.c:2373
 blkdev_read_folio+0x1c/0x20 block/fops.c:396
 filemap_read_folio mm/filemap.c:2424 [inline]
 do_read_cache_folio+0x1a0/0x450 mm/filemap.c:3683
 read_cache_folio+0x3a/0x50 mm/filemap.c:3715
 read_mapping_folio include/linux/pagemap.h:775 [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+0x233/0x250 block/bdev.c:607
 blkdev_get_by_dev+0x24c/0x660 block/bdev.c:744
 disk_scan_partitions+0x140/0x1a0 block/genhd.c:384
 blkdev_common_ioctl+0xe1d/0x14d0 block/ioctl.c:531
 blkdev_ioctl+0x33d/0x490 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: 0x00000000 -> 0x00000001

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 2746 Comm: udevd Not tainted 6.3.0-rc7-syzkaller-00060-g789b4a41c247 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023
==================================================================
 loop0: unable to read partition table
loop0: partition table beyond EOD, truncated
 loop0: unable to read partition table
loop0: partition table beyond EOD, truncated

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/04/19 21:10 upstream 789b4a41c247 a219f34e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __bio_queue_enter / blk_freeze_queue
* Struck through repros no longer work on HEAD.