syzbot


KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_run_hw_queue (4)

Status: auto-closed as invalid on 2022/03/23 12:22
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 316d, last: 290d
similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_run_hw_queue (2) 16 660d 725d 0/24 auto-closed as invalid on 2021/03/17 22:19
upstream KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_run_hw_queue 24 764d 886d 0/24 auto-closed as invalid on 2020/12/04 12:11
upstream KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_run_hw_queue (5) 1 240d 240d 0/24 auto-closed as invalid on 2022/05/11 20:53
upstream KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_run_hw_queue (3) 24 367d 623d 0/24 auto-closed as invalid on 2022/01/04 22:32

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_run_hw_queue

write to 0xffff8881027fa210 of 8 bytes by task 39 on cpu 0:
 INIT_LIST_HEAD include/linux/list.h:38 [inline]
 list_splice_init include/linux/list.h:492 [inline]
 __blk_mq_sched_dispatch_requests+0x137/0x270 block/blk-mq-sched.c:280
 blk_mq_sched_dispatch_requests+0x9f/0x110 block/blk-mq-sched.c:332
 __blk_mq_run_hw_queue+0x7e/0x100 block/blk-mq.c:1968
 __blk_mq_delay_run_hw_queue+0x19c/0x390 block/blk-mq.c:2045
 blk_mq_run_hw_queue+0x180/0x310 block/blk-mq.c:2096
 blk_mq_run_hw_queues+0x1d1/0x230 block/blk-mq.c:2159
 blk_mq_requeue_work+0x3bd/0x3f0 block/blk-mq.c:1309
 process_one_work+0x3f6/0x960 kernel/workqueue.c:2307
 worker_thread+0x616/0xa70 kernel/workqueue.c:2454
 kthread+0x1bf/0x1e0 kernel/kthread.c:377
 ret_from_fork+0x1f/0x30

read to 0xffff8881027fa210 of 8 bytes by task 21280 on cpu 1:
 list_empty_careful include/linux/list.h:329 [inline]
 blk_mq_hctx_has_pending block/blk-mq.c:100 [inline]
 blk_mq_run_hw_queue+0x19b/0x310 block/blk-mq.c:2091
 blk_mq_sched_insert_request+0x117/0x220 block/blk-mq-sched.c:451
 blk_mq_submit_bio+0xb01/0xec0 block/blk-mq.c:2835
 __submit_bio+0x151/0x350 block/blk-core.c:806
 __submit_bio_noacct_mq block/blk-core.c:881 [inline]
 submit_bio_noacct+0x418/0x4e0 block/blk-core.c:907
 submit_bio+0x10c/0x180
 ext4_mpage_readpages+0xe60/0xeb0 fs/ext4/readpage.c:405
 filemap_read_folio mm/filemap.c:2419 [inline]
 filemap_create_folio mm/filemap.c:2544 [inline]
 filemap_get_pages mm/filemap.c:2596 [inline]
 filemap_read+0x852/0x1430 mm/filemap.c:2676
 generic_file_read_iter+0x72/0x320 mm/filemap.c:2822
 call_read_iter include/linux/fs.h:2068 [inline]
 generic_file_splice_read+0x24f/0x330 fs/splice.c:311
 do_splice_to fs/splice.c:796 [inline]
 splice_direct_to_actor+0x2aa/0x650 fs/splice.c:870
 do_splice_direct+0x106/0x190 fs/splice.c:979
 do_sendfile+0x675/0xc40 fs/read_write.c:1245
 __do_sys_sendfile64 fs/read_write.c:1310 [inline]
 __se_sys_sendfile64 fs/read_write.c:1296 [inline]
 __x64_sys_sendfile64+0x102/0x140 fs/read_write.c:1296
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0xffff8881013fa048 -> 0xffff8881027fa208

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 21280 Comm: syz-executor.5 Not tainted 5.17.0-rc4-syzkaller-00051-gc5d9ae265b10-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/02/16 12:19 upstream c5d9ae265b10 8b9ca619 .config log report info KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_run_hw_queue
ci2-upstream-kcsan-gce 2022/01/21 08:50 upstream 2c271fe77d52 ab3d9f17 .config log report info KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_run_hw_queue
* Struck through repros no longer work on HEAD.