syzbot


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

Status: auto-closed as invalid on 2022/05/17 13:43
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 279d, last: 238d
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 (5) 1 315d 315d 0/24 auto-closed as invalid on 2022/03/01 13:18
upstream KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_do_dispatch_sched (2) 8 787d 857d 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 2 894d 899d 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 400d 516d 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 553d 729d 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 0xffff88810345fe10 of 8 bytes by task 9 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:287
 blk_mq_sched_dispatch_requests+0x8f/0xf0 block/blk-mq-sched.c:339
 __blk_mq_run_hw_queue+0x7e/0x100 block/blk-mq.c:1980
 __blk_mq_delay_run_hw_queue+0x194/0x390 block/blk-mq.c:2057
 blk_mq_run_hw_queue+0x180/0x310 block/blk-mq.c:2108
 blk_mq_run_hw_queues+0x1c0/0x240 block/blk-mq.c:2171
 blk_mq_requeue_work+0x3cd/0x400 block/blk-mq.c:1321
 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

read to 0xffff88810345fe10 of 8 bytes by task 25541 on cpu 1:
 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+0x187/0x780 block/blk-mq-sched.c:187
 __blk_mq_sched_dispatch_requests+0x1ca/0x270
 blk_mq_sched_dispatch_requests+0x8f/0xf0 block/blk-mq-sched.c:339
 __blk_mq_run_hw_queue+0x7e/0x100 block/blk-mq.c:1980
 __blk_mq_delay_run_hw_queue+0x194/0x390 block/blk-mq.c:2057
 blk_mq_run_hw_queue+0x180/0x310 block/blk-mq.c:2108
 blk_mq_sched_insert_requests+0x1cb/0x2a0 block/blk-mq-sched.c:493
 blk_mq_dispatch_plug_list+0x1e9/0x2c0 block/blk-mq.c:2603
 blk_mq_flush_plug_list+0x2ea/0x340 block/blk-mq.c:2645
 __blk_flush_plug+0x25a/0x2b0 block/blk-core.c:1244
 blk_finish_plug+0x44/0x60 block/blk-core.c:1268
 ext4_writepages+0x14a1/0x1970 fs/ext4/inode.c:2855
 do_writepages+0x1db/0x350 mm/page-writeback.c:2352
 filemap_fdatawrite_wbc+0xd6/0xf0 mm/filemap.c:388
 __filemap_fdatawrite_range mm/filemap.c:421 [inline]
 filemap_write_and_wait_range+0xbf/0x2e0 mm/filemap.c:673
 __iomap_dio_rw+0x514/0xf80 fs/iomap/direct-io.c:562
 iomap_dio_rw+0x38/0x80 fs/iomap/direct-io.c:681
 ext4_dio_read_iter fs/ext4/file.c:79 [inline]
 ext4_file_read_iter+0x19c/0x200 fs/ext4/file.c:130
 call_read_iter include/linux/fs.h:2044 [inline]
 generic_file_splice_read+0x1de/0x2c0 fs/splice.c:311
 do_splice_to fs/splice.c:796 [inline]
 splice_direct_to_actor+0x2ac/0x660 fs/splice.c:870
 do_splice_direct+0xfb/0x180 fs/splice.c:979
 do_sendfile+0x3ad/0x900 fs/read_write.c:1246
 __do_sys_sendfile64 fs/read_write.c:1311 [inline]
 __se_sys_sendfile64 fs/read_write.c:1297 [inline]
 __x64_sys_sendfile64+0x10c/0x150 fs/read_write.c:1297
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0xffff8881021b7048 -> 0xffff88810345fe08

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 25541 Comm: syz-executor.2 Not tainted 5.18.0-rc2-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/04/12 13:33 upstream ce522ba9ef7e af01ee7d .config log report info KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_do_dispatch_sched
ci2-upstream-kcsan-gce 2022/03/16 02:29 upstream 56e337f2cf13 9e8eaa75 .config log report info KCSAN: data-race in __blk_mq_sched_dispatch_requests / blk_mq_do_dispatch_sched
ci2-upstream-kcsan-gce 2022/03/02 05:57 upstream 575115360652 45a13a73 .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.