syzbot


KCSAN: data-race in blk_mq_start_request / bt_for_each

Status: auto-obsoleted due to no activity on 2024/03/02 18:09
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+c771ffbc18956ee6c8a8@syzkaller.appspotmail.com
First crash: 78d, last: 78d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in blk_mq_start_request / bt_for_each

write to 0xffff8881022a2f58 of 8 bytes by task 62 on cpu 1:
 blk_mq_start_request+0x1a4/0x300 block/blk-mq.c:1268
 scsi_queue_rq+0x14a3/0x1a10 drivers/scsi/scsi_lib.c:1757
 blk_mq_dispatch_rq_list+0x2d9/0x10a0 block/blk-mq.c:2071
 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:170 [inline]
 blk_mq_do_dispatch_sched block/blk-mq-sched.c:184 [inline]
 __blk_mq_sched_dispatch_requests+0x5ec/0xd20 block/blk-mq-sched.c:309
 blk_mq_sched_dispatch_requests+0x78/0xe0 block/blk-mq-sched.c:331
 blk_mq_run_hw_queue+0x298/0x4c0 block/blk-mq.c:2286
 blk_mq_flush_plug_list+0x7a7/0xdb0 block/blk-mq.c:2834
 blk_add_rq_to_plug+0x102/0x3d0 block/blk-mq.c:1300
 blk_mq_submit_bio+0x760/0x1020 block/blk-mq.c:3037
 __submit_bio+0x11c/0x350 block/blk-core.c:607
 __submit_bio_noacct_mq block/blk-core.c:686 [inline]
 submit_bio_noacct_nocheck+0x4ad/0x5e0 block/blk-core.c:715
 submit_bio_noacct+0x67d/0x830 block/blk-core.c:825
 submit_bio+0xb7/0xc0 block/blk-core.c:858
 ext4_io_submit+0x8a/0xa0 fs/ext4/page-io.c:378
 ext4_do_writepages+0xb3a/0x2100 fs/ext4/inode.c:2705
 ext4_writepages+0x15e/0x2e0 fs/ext4/inode.c:2774
 do_writepages+0x1c2/0x340 mm/page-writeback.c:2553
 __writeback_single_inode+0x91/0x860 fs/fs-writeback.c:1625
 writeback_sb_inodes+0x514/0xad0 fs/fs-writeback.c:1916
 wb_writeback+0x252/0x6e0 fs/fs-writeback.c:2092
 wb_do_writeback fs/fs-writeback.c:2239 [inline]
 wb_workfn+0x1a8/0x8d0 fs/fs-writeback.c:2279
 process_one_work kernel/workqueue.c:2633 [inline]
 process_scheduled_works+0x5b8/0xa30 kernel/workqueue.c:2706
 worker_thread+0x525/0x730 kernel/workqueue.c:2787
 kthread+0x1d7/0x210 kernel/kthread.c:388
 ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

read to 0xffff8881022a2f58 of 8 bytes by task 79 on cpu 0:
 blk_mq_find_and_get_req block/blk-mq-tag.c:259 [inline]
 bt_iter block/blk-mq-tag.c:287 [inline]
 __sbitmap_for_each_set include/linux/sbitmap.h:281 [inline]
 sbitmap_for_each_set include/linux/sbitmap.h:302 [inline]
 bt_for_each+0x279/0x470 block/blk-mq-tag.c:324
 blk_mq_queue_tag_busy_iter+0x1a4/0x320 block/blk-mq-tag.c:533
 blk_mq_timeout_work+0xc4/0x350 block/blk-mq.c:1664
 process_one_work kernel/workqueue.c:2633 [inline]
 process_scheduled_works+0x5b8/0xa30 kernel/workqueue.c:2706
 worker_thread+0x525/0x730 kernel/workqueue.c:2787
 kthread+0x1d7/0x210 kernel/kthread.c:388
 ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

value changed: 0xffff888102d35e40 -> 0xffff888102d416c0

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 79 Comm: kworker/0:1H Not tainted 6.8.0-rc1-syzkaller-00331-gcd2286fc5775 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Workqueue: kblockd blk_mq_timeout_work
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/27 18:08 upstream cd2286fc5775 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in blk_mq_start_request / bt_for_each
* Struck through repros no longer work on HEAD.