syzbot


KCSAN: data-race in blk_mq_handle_dev_resource / bt_tags_iter

Status: auto-obsoleted due to no activity on 2023/03/28 12:11
Subsystems: block
[Documentation on labels]
First crash: 1018d, last: 947d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in blk_mq_handle_dev_resource / bt_tags_iter

write to 0xffff8881031f2a60 of 4 bytes by task 41 on cpu 1:
 __blk_mq_put_driver_tag block/blk-mq.h:256 [inline]
 blk_mq_put_driver_tag block/blk-mq.h:269 [inline]
 __blk_mq_requeue_request block/blk-mq.c:1425 [inline]
 blk_mq_handle_dev_resource+0x25b/0x440 block/blk-mq.c:1931
 blk_mq_dispatch_rq_list+0xa9a/0x1290 block/blk-mq.c:2065
 __blk_mq_sched_dispatch_requests+0x1b7/0x270 block/blk-mq-sched.c:306
 blk_mq_sched_dispatch_requests+0x8f/0xf0 block/blk-mq-sched.c:339
 __blk_mq_run_hw_queue+0x8b/0x150 block/blk-mq.c:2174
 __blk_mq_delay_run_hw_queue+0x15b/0x2e0 block/blk-mq.c:2250
 blk_mq_run_hw_queue+0x1be/0x350 block/blk-mq.c:2298
 blk_mq_run_hw_queues+0x180/0x200 block/blk-mq.c:2346
 scsi_run_queue+0x5a0/0x5d0 drivers/scsi/scsi_lib.c:457
 scsi_requeue_run_queue+0x21/0x30 drivers/scsi/scsi_lib.c:467
 process_one_work+0x3d3/0x720 kernel/workqueue.c:2289
 worker_thread+0x618/0xa70 kernel/workqueue.c:2436
 kthread+0x1a9/0x1e0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308

read to 0xffff8881031f2a60 of 4 bytes by task 10320 on cpu 0:
 blk_mq_find_and_get_req block/blk-mq-tag.c:253 [inline]
 bt_tags_iter+0x120/0x260 block/blk-mq-tag.c:349
 __sbitmap_for_each_set include/linux/sbitmap.h:281 [inline]
 sbitmap_for_each_set include/linux/sbitmap.h:302 [inline]
 bt_tags_for_each block/blk-mq-tag.c:384 [inline]
 __blk_mq_all_tag_iter block/blk-mq-tag.c:395 [inline]
 blk_mq_tagset_busy_iter+0x53f/0x680 block/blk-mq-tag.c:439
 scsi_host_busy+0x4b/0x80 drivers/scsi/hosts.c:604
 scsi_host_queue_ready drivers/scsi/scsi_lib.c:1345 [inline]
 scsi_queue_rq+0x305/0x15a0 drivers/scsi/scsi_lib.c:1735
 blk_mq_dispatch_rq_list+0x997/0x1290 block/blk-mq.c:2056
 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:173 [inline]
 blk_mq_do_dispatch_sched+0x49d/0x7f0 block/blk-mq-sched.c:187
 __blk_mq_sched_dispatch_requests+0x1cd/0x270
 blk_mq_sched_dispatch_requests+0x8f/0xf0 block/blk-mq-sched.c:339
 __blk_mq_run_hw_queue+0x8b/0x150 block/blk-mq.c:2174
 __blk_mq_delay_run_hw_queue+0x15b/0x2e0 block/blk-mq.c:2250
 blk_mq_run_hw_queue+0x1be/0x350 block/blk-mq.c:2298
 blk_mq_sched_insert_requests+0x220/0x300 block/blk-mq-sched.c:493
 blk_mq_dispatch_plug_list+0x1e9/0x2c0 block/blk-mq.c:2758
 blk_mq_flush_plug_list+0x38a/0x3e0 block/blk-mq.c:2800
 blk_add_rq_to_plug+0x142/0x390 block/blk-mq.c:1296
 blk_mq_submit_bio+0x9a7/0xf10 block/blk-mq.c:2998
 __submit_bio block/blk-core.c:602 [inline]
 __submit_bio_noacct_mq block/blk-core.c:679 [inline]
 submit_bio_noacct_nocheck+0x83d/0xaa0 block/blk-core.c:696
 submit_bio_noacct+0x6a5/0x810 block/blk-core.c:802
 submit_bio+0xfb/0x110 block/blk-core.c:838
 ext4_io_submit fs/ext4/page-io.c:378 [inline]
 io_submit_add_bh fs/ext4/page-io.c:420 [inline]
 ext4_bio_write_page+0x6dd/0xc20 fs/ext4/page-io.c:564
 mpage_submit_page fs/ext4/inode.c:2129 [inline]
 mpage_map_and_submit_buffers fs/ext4/inode.c:2374 [inline]
 mpage_map_and_submit_extent fs/ext4/inode.c:2513 [inline]
 ext4_do_writepages+0x11a8/0x1e70 fs/ext4/inode.c:2877
 ext4_writepages+0x11b/0x240 fs/ext4/inode.c:2965
 do_writepages+0x1db/0x350 mm/page-writeback.c:2581
 __writeback_single_inode+0x81/0x590 fs/fs-writeback.c:1598
 writeback_sb_inodes+0x4dd/0xa30 fs/fs-writeback.c:1889
 __writeback_inodes_wb+0xa0/0x1b0 fs/fs-writeback.c:1960
 wb_writeback+0x280/0x650 fs/fs-writeback.c:2065
 wb_check_start_all fs/fs-writeback.c:2187 [inline]
 wb_do_writeback+0x418/0x600 fs/fs-writeback.c:2213
 wb_workfn+0x88/0x260 fs/fs-writeback.c:2246
 process_one_work+0x3d3/0x720 kernel/workqueue.c:2289
 worker_thread+0x618/0xa70 kernel/workqueue.c:2436
 kthread+0x1a9/0x1e0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308

value changed: 0x00000b04 -> 0xffffffff

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 10320 Comm: kworker/u4:47 Not tainted 6.2.0-rc5-syzkaller-00047-g7c46948a6e9c-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Workqueue: writeback wb_workfn (flush-8:0)
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/26 11:20 upstream 7c46948a6e9c 9dfcf09c .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in blk_mq_handle_dev_resource / bt_tags_iter
2022/12/24 14:18 upstream 51094a24b85e 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in blk_mq_handle_dev_resource / bt_tags_iter
2022/12/13 14:58 upstream 9b93f5069fd9 67be1ae7 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in blk_mq_handle_dev_resource / bt_tags_iter
2022/11/27 04:31 upstream 644e9524388a f4470a7b .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in blk_mq_handle_dev_resource / bt_tags_iter
2022/11/21 01:48 upstream 77c51ba552a1 5bb70014 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in blk_mq_handle_dev_resource / bt_tags_iter
2022/11/16 16:52 upstream 81e7cfa3a9eb 3a127a31 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in blk_mq_handle_dev_resource / bt_tags_iter
* Struck through repros no longer work on HEAD.