syzbot


KCSAN: data-race in dd_has_work / deadline_remove_request

Status: closed as invalid on 2020/06/18 14:13
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 809d, last: 806d
similar bugs (7):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in dd_has_work / deadline_remove_request (8) 8 91d 149d 0/23 auto-closed as invalid on 2022/06/12 02:20
upstream KCSAN: data-race in dd_has_work / deadline_remove_request (4) 1 548d 548d 0/23 auto-closed as invalid on 2021/03/12 01:36
upstream KCSAN: data-race in dd_has_work / deadline_remove_request (7) 8 207d 285d 0/23 auto-closed as invalid on 2022/02/16 12:39
upstream KCSAN: data-race in dd_has_work / deadline_remove_request (5) 2 472d 502d 0/23 auto-closed as invalid on 2021/05/27 11:41
upstream KCSAN: data-race in dd_has_work / deadline_remove_request (2) 10 680d 767d 0/23 auto-closed as invalid on 2020/10/31 03:43
upstream KCSAN: data-race in dd_has_work / deadline_remove_request (3) 6 608d 608d 0/23 auto-closed as invalid on 2021/01/11 08:35
upstream KCSAN: data-race in dd_has_work / deadline_remove_request (6) 7 377d 408d 0/23 auto-closed as invalid on 2021/09/03 05:59

Sample crash report:
==================================================================
BUG: KCSAN: data-race in dd_has_work / deadline_remove_request

write to 0xffff88812a0669a8 of 8 bytes by task 3439 on cpu 0:
 __list_del include/linux/list.h:112 [inline]
 __list_del_entry include/linux/list.h:135 [inline]
 __list_del_entry include/linux/list.h:130 [inline]
 list_del_init include/linux/list.h:204 [inline]
 deadline_remove_request+0x143/0x250 block/mq-deadline.c:113
 deadline_move_request block/mq-deadline.c:176 [inline]
 __dd_dispatch_request block/mq-deadline.c:365 [inline]
 dd_dispatch_request+0x41b/0x4f0 block/mq-deadline.c:387
 blk_mq_do_dispatch_sched+0x1f2/0x270 block/blk-mq-sched.c:103
 blk_mq_sched_dispatch_requests+0x2b6/0x380 block/blk-mq-sched.c:211
 __blk_mq_run_hw_queue+0xb1/0x150 block/blk-mq.c:1389
 blk_mq_run_work_fn+0x50/0x60 block/blk-mq.c:1648
 process_one_work+0x424/0x930 kernel/workqueue.c:2268
 worker_thread+0x9a/0x7e0 kernel/workqueue.c:2414
 kthread+0x203/0x230 kernel/kthread.c:268
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352

read to 0xffff88812a0669a8 of 8 bytes by task 14917 on cpu 1:
 list_empty_careful include/linux/list.h:301 [inline]
 dd_has_work+0xde/0xf0 block/mq-deadline.c:584
 blk_mq_do_dispatch_sched+0x171/0x270 block/blk-mq-sched.c:97
 blk_mq_sched_dispatch_requests+0x2b6/0x380 block/blk-mq-sched.c:211
 __blk_mq_run_hw_queue+0xb1/0x150 block/blk-mq.c:1389
 __blk_mq_delay_run_hw_queue+0x315/0x390 block/blk-mq.c:1466
 blk_mq_run_hw_queue+0xfa/0x1b0 block/blk-mq.c:1519
 blk_mq_sched_insert_requests+0x19c/0x270 block/blk-mq-sched.c:474
 blk_mq_flush_plug_list+0x2f0/0x4c0 block/blk-mq.c:1769
 blk_flush_plug_list+0x281/0x2b0 block/blk-core.c:1760
 blk_finish_plug block/blk-core.c:1777 [inline]
 blk_finish_plug+0x59/0x7a block/blk-core.c:1773
 ext4_writepages+0xc9d/0x1e10 fs/ext4/inode.c:2831
 do_writepages+0x6b/0x170 mm/page-writeback.c:2344
 __filemap_fdatawrite_range+0x1bb/0x220 mm/filemap.c:421
 file_write_and_wait_range+0xfb/0x160 mm/filemap.c:760
 ext4_sync_file+0x26e/0x8b0 fs/ext4/fsync.c:153
 vfs_fsync_range+0x7c/0x150 fs/sync.c:197
 generic_write_sync include/linux/fs.h:2872 [inline]
 ext4_buffered_write_iter+0x211/0x280 fs/ext4/file.c:277
 ext4_file_write_iter+0xf4/0xd30 fs/ext4/file.c:642
 call_write_iter include/linux/fs.h:1907 [inline]
 do_iter_readv_writev+0x4a7/0x5d0 fs/read_write.c:694
 do_iter_write fs/read_write.c:999 [inline]
 do_iter_write+0x137/0x3a0 fs/read_write.c:980
 vfs_iter_write+0x56/0x80 fs/read_write.c:1040
 iter_file_splice_write+0x530/0x830 fs/splice.c:760
 do_splice_from fs/splice.c:863 [inline]
 direct_splice_actor+0x97/0xb0 fs/splice.c:1037
 splice_direct_to_actor+0x22f/0x540 fs/splice.c:992
 do_splice_direct+0x152/0x1d0 fs/splice.c:1080
 do_sendfile+0x380/0x800 fs/read_write.c:1521
 __do_sys_sendfile64 fs/read_write.c:1576 [inline]
 __se_sys_sendfile64 fs/read_write.c:1568 [inline]
 __x64_sys_sendfile64+0xb8/0x140 fs/read_write.c:1568
 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 14917 Comm: syz-executor.4 Not tainted 5.7.0-rc1-syzkaller #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 2020/05/22 17:38 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 4afdfa20 .config log report
ci2-upstream-kcsan-gce 2020/05/19 16:01 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 6d882fd2 .config log report