syzbot


KCSAN: data-race in bt_for_each / flush_end_io (2)

Status: auto-obsoleted due to no activity on 2023/11/10 08:28
Subsystems: block
[Documentation on labels]
First crash: 346d, last: 346d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in bt_for_each / flush_end_io block 1 684d 684d 0/28 auto-obsoleted due to no activity on 2022/12/07 09:13
upstream KCSAN: data-race in bt_for_each / flush_end_io (3) block 1 67d 67d 0/28 auto-obsoleted due to no activity on 2024/08/15 02:27

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

write to 0xffff888101c27820 of 4 bytes by interrupt on cpu 1:
 __blk_mq_put_driver_tag block/blk-mq.h:306 [inline]
 blk_mq_put_driver_tag block/blk-mq.h:319 [inline]
 flush_end_io+0x34d/0x560 block/blk-flush.c:249
 __blk_mq_end_request+0x1fb/0x230 block/blk-mq.c:1041
 scsi_end_request+0x2b1/0x4e0 drivers/scsi/scsi_lib.c:572
 scsi_io_completion+0xc7/0x200 drivers/scsi/scsi_lib.c:974
 scsi_finish_command+0x1bb/0x1d0 drivers/scsi/scsi.c:198
 scsi_complete+0x19a/0x1d0 drivers/scsi/scsi_lib.c:1438
 blk_complete_reqs block/blk-mq.c:1131 [inline]
 blk_done_softirq+0x73/0xa0 block/blk-mq.c:1136
 __do_softirq+0xc1/0x265 kernel/softirq.c:553
 invoke_softirq kernel/softirq.c:427 [inline]
 __irq_exit_rcu kernel/softirq.c:632 [inline]
 irq_exit_rcu+0x3b/0x90 kernel/softirq.c:644
 common_interrupt+0x7f/0x90 arch/x86/kernel/irq.c:247
 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:636
 check_kcov_mode kernel/kcov.c:175 [inline]
 __sanitizer_cov_trace_pc+0x36/0x60 kernel/kcov.c:207
 rht_bucket_var include/linux/rhashtable.h:297 [inline]
 rhashtable_rehash_chain lib/rhashtable.c:280 [inline]
 rhashtable_rehash_table lib/rhashtable.c:328 [inline]
 rht_deferred_worker+0x37c/0xb50 lib/rhashtable.c:432
 process_one_work kernel/workqueue.c:2630 [inline]
 process_scheduled_works+0x5b8/0xa30 kernel/workqueue.c:2703
 worker_thread+0x525/0x730 kernel/workqueue.c:2784
 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:304

read to 0xffff888101c27820 of 4 bytes by task 77 on cpu 0:
 blk_mq_find_and_get_req block/blk-mq-tag.c:260 [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+0x291/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:1645
 process_one_work kernel/workqueue.c:2630 [inline]
 process_scheduled_works+0x5b8/0xa30 kernel/workqueue.c:2703
 worker_thread+0x525/0x730 kernel/workqueue.c:2784
 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:304

value changed: 0x000004d5 -> 0xffffffff

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 77 Comm: kworker/0:1H Not tainted 6.6.0-rc4-syzkaller-00176-gb78b18fb8ee1 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/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
2023/10/06 08:24 upstream b78b18fb8ee1 db17ad9f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bt_for_each / flush_end_io
* Struck through repros no longer work on HEAD.