syzbot


KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_do_dispatch_sched (5)

Status: auto-closed as invalid on 2022/03/01 13:18
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 311d, last: 311d
similar bugs (5):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_do_dispatch_sched (2) 8 783d 854d 0/24 auto-closed as invalid on 2020/11/14 12:11
upstream KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_do_dispatch_sched (6) 3 234d 276d 0/24 auto-closed as invalid on 2022/05/17 13:43
upstream KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_do_dispatch_sched 2 891d 896d 0/24 auto-closed as invalid on 2020/07/30 00:43
upstream KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_do_dispatch_sched (4) 9 397d 512d 0/24 auto-closed as invalid on 2021/12/05 20:22
upstream KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_do_dispatch_sched (3) 28 550d 725d 0/24 auto-closed as invalid on 2021/07/05 21:10

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

write to 0xffff888101fc4410 of 8 bytes by task 227 on cpu 1:
 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 0xffff888101fc4410 of 8 bytes by task 7439 on cpu 0:
 list_empty_careful include/linux/list.h:329 [inline]
 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:112 [inline]
 blk_mq_do_dispatch_sched+0x167/0x6d0 block/blk-mq-sched.c:186
 __blk_mq_sched_dispatch_requests+0x1ca/0x270
 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_sched_insert_requests+0x1cc/0x2a0 block/blk-mq-sched.c:486
 blk_mq_flush_plug_list+0x5c3/0x6c0 block/blk-mq.c:2628
 blk_flush_plug+0x25a/0x2b0 block/blk-core.c:1269
 blk_finish_plug+0x44/0x60 block/blk-core.c:1293
 __iomap_dio_rw+0xcd4/0x10b0 fs/iomap/direct-io.c:598
 iomap_dio_rw+0x38/0x80 fs/iomap/direct-io.c:680
 ext4_dio_write_iter fs/ext4/file.c:564 [inline]
 ext4_file_write_iter+0x7d5/0xda0 fs/ext4/file.c:675
 call_write_iter include/linux/fs.h:2074 [inline]
 do_iter_readv_writev+0x2de/0x380 fs/read_write.c:725
 do_iter_write+0x192/0x5c0 fs/read_write.c:851
 vfs_iter_write+0x4c/0x70 fs/read_write.c:892
 iter_file_splice_write+0x43a/0x790 fs/splice.c:689
 do_splice_from fs/splice.c:767 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:936
 splice_direct_to_actor+0x345/0x650 fs/splice.c:891
 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: 0xffff8881029e26c8 -> 0xffff888101fc4408

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

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/01/25 13:17 upstream dd81e1c7d5fb 2cbffd88 .config log report info KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_do_dispatch_sched
* Struck through repros no longer work on HEAD.