syzbot


KCSAN: data-race in dd_has_work / deadline_remove_request (7)

Status: auto-closed as invalid on 2022/02/16 12:39
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 407d, last: 329d
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 2 929d 932d 0/24 closed as invalid on 2020/06/18 14:13
upstream KCSAN: data-race in dd_has_work / deadline_remove_request (8) 8 213d 271d 0/24 auto-closed as invalid on 2022/06/12 02:20
upstream KCSAN: data-race in dd_has_work / deadline_remove_request (4) 1 670d 670d 0/24 auto-closed as invalid on 2021/03/12 01:36
upstream KCSAN: data-race in dd_has_work / deadline_remove_request (5) 2 594d 624d 0/24 auto-closed as invalid on 2021/05/27 11:41
upstream KCSAN: data-race in dd_has_work / deadline_remove_request (2) 10 802d 889d 0/24 auto-closed as invalid on 2020/10/31 03:43
upstream KCSAN: data-race in dd_has_work / deadline_remove_request (3) 6 730d 730d 0/24 auto-closed as invalid on 2021/01/11 08:35
upstream KCSAN: data-race in dd_has_work / deadline_remove_request (6) 7 499d 531d 0/24 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 0xffff888102a78c98 of 8 bytes by task 2631 on cpu 0:
 __list_del include/linux/list.h:114 [inline]
 __list_del_entry include/linux/list.h:137 [inline]
 list_del_init include/linux/list.h:206 [inline]
 deadline_remove_request+0x58/0x190 block/mq-deadline.c:173
 deadline_move_request block/mq-deadline.c:249 [inline]
 __dd_dispatch_request+0x422/0x4d0 block/mq-deadline.c:465
 dd_dispatch_request+0x1d0/0x2b0 block/mq-deadline.c:531
 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:147 [inline]
 blk_mq_do_dispatch_sched+0x1e7/0x6d0 block/blk-mq-sched.c:212
 __blk_mq_sched_dispatch_requests+0x1ca/0x270
 blk_mq_sched_dispatch_requests+0x9f/0x110 block/blk-mq-sched.c:358
 __blk_mq_run_hw_queue+0xc1/0x140 block/blk-mq.c:1785
 __blk_mq_delay_run_hw_queue+0x199/0x360 block/blk-mq.c:1862
 blk_mq_run_hw_queue+0x231/0x260 block/blk-mq.c:1915
 blk_mq_sched_insert_requests+0x130/0x200 block/blk-mq-sched.c:511
 blk_mq_flush_plug_list+0x372/0x460 block/blk-mq.c:2292
 blk_flush_plug+0x25a/0x2b0 block/blk-core.c:1593
 blk_finish_plug+0x44/0x60 block/blk-core.c:1617
 ext4_writepages+0x1581/0x1a50 fs/ext4/inode.c:2828
 do_writepages+0x1cb/0x330 mm/page-writeback.c:2364
 filemap_fdatawrite_wbc mm/filemap.c:407 [inline]
 __filemap_fdatawrite_range mm/filemap.c:440 [inline]
 file_write_and_wait_range+0x132/0x1d0 mm/filemap.c:824
 ext4_sync_file+0xad/0x570 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:182
 generic_write_sync include/linux/fs.h:2894 [inline]
 ext4_buffered_write_iter+0x243/0x290 fs/ext4/file.c:275
 ext4_file_write_iter+0x227/0xda0
 call_write_iter include/linux/fs.h:2086 [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:1304 [inline]
 __se_sys_sendfile64 fs/read_write.c:1296 [inline]
 __x64_sys_sendfile64+0xb9/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

read to 0xffff888102a78c98 of 8 bytes by task 2600 on cpu 1:
 list_empty_careful include/linux/list.h:321 [inline]
 dd_has_work_for_prio block/mq-deadline.c:837 [inline]
 dd_has_work+0x188/0x260 block/mq-deadline.c:846
 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:135 [inline]
 blk_mq_do_dispatch_sched+0x12a/0x6d0 block/blk-mq-sched.c:212
 __blk_mq_sched_dispatch_requests+0x1ca/0x270
 blk_mq_sched_dispatch_requests+0x9f/0x110 block/blk-mq-sched.c:358
 __blk_mq_run_hw_queue+0xc1/0x140 block/blk-mq.c:1785
 __blk_mq_delay_run_hw_queue+0x199/0x360 block/blk-mq.c:1862
 blk_mq_run_hw_queue+0x231/0x260 block/blk-mq.c:1915
 blk_mq_sched_insert_requests+0x130/0x200 block/blk-mq-sched.c:511
 blk_mq_flush_plug_list+0x372/0x460 block/blk-mq.c:2292
 blk_flush_plug+0x25a/0x2b0 block/blk-core.c:1593
 blk_finish_plug+0x44/0x60 block/blk-core.c:1617
 ext4_writepages+0x1581/0x1a50 fs/ext4/inode.c:2828
 do_writepages+0x1cb/0x330 mm/page-writeback.c:2364
 filemap_fdatawrite_wbc mm/filemap.c:407 [inline]
 __filemap_fdatawrite_range mm/filemap.c:440 [inline]
 file_write_and_wait_range+0x132/0x1d0 mm/filemap.c:824
 ext4_sync_file+0xad/0x570 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:182
 generic_write_sync include/linux/fs.h:2894 [inline]
 ext4_buffered_write_iter+0x243/0x290 fs/ext4/file.c:275
 ext4_file_write_iter+0x227/0xda0
 call_write_iter include/linux/fs.h:2086 [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:1304 [inline]
 __se_sys_sendfile64 fs/read_write.c:1296 [inline]
 __x64_sys_sendfile64+0xb9/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: 0xffff888102a90ac8 -> 0xffff888102a78c90

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 2600 Comm: syz-executor.0 Not tainted 5.16.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
syz-executor.0 (2600) used greatest stack depth: 9744 bytes left

Crashes (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/01/12 12:38 upstream daadb3bd0e8d 44d1319a .config log report info KCSAN: data-race in dd_has_work / deadline_remove_request
ci2-upstream-kcsan-gce 2022/01/10 19:26 upstream 133d9c53c9dc ddb0ab8c .config log report info KCSAN: data-race in dd_has_work / deadline_remove_request
ci2-upstream-kcsan-gce 2022/01/04 09:14 upstream c9e6606c7fe9 7f723fbe .config log report info KCSAN: data-race in dd_has_work / deadline_remove_request
ci2-upstream-kcsan-gce 2021/12/22 23:37 upstream bc491fb12513 6caa12e4 .config log report info KCSAN: data-race in dd_has_work / deadline_remove_request
ci2-upstream-kcsan-gce 2021/11/30 10:58 upstream d58071a8a76d 80270552 .config log report info KCSAN: data-race in dd_has_work / deadline_remove_request
ci2-upstream-kcsan-gce 2021/11/26 10:55 upstream a4849f6000e2 63eeac02 .config log report info KCSAN: data-race in dd_has_work / deadline_remove_request
ci2-upstream-kcsan-gce 2021/11/04 21:28 upstream 7ddb58cb0eca 4c1be0be .config log report info KCSAN: data-race in dd_has_work / deadline_remove_request
ci2-upstream-kcsan-gce 2021/10/26 00:00 upstream 87066fdd2e30 c1132b49 .config log report info KCSAN: data-race in dd_has_work / deadline_remove_request
* Struck through repros no longer work on HEAD.