syzbot


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

Status: auto-closed as invalid on 2021/03/12 01:36
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 548d, last: 548d
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 806d 810d 0/23 closed as invalid on 2020/06/18 14:13
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 (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 0xffff8881039b1aa8 of 8 bytes by task 19617 on cpu 1:
 __list_del include/linux/list.h:112 [inline]
 __list_del_entry include/linux/list.h:135 [inline]
 list_del_init include/linux/list.h:204 [inline]
 deadline_remove_request+0x6a/0x180 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+0x9ec/0xa90 block/mq-deadline.c:387
 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:146 [inline]
 blk_mq_do_dispatch_sched+0x1df/0x610 block/blk-mq-sched.c:199
 __blk_mq_sched_dispatch_requests+0x1fd/0x2a0 block/blk-mq-sched.c:310
 blk_mq_sched_dispatch_requests+0x9f/0x110 block/blk-mq-sched.c:341
 __blk_mq_run_hw_queue block/blk-mq.c:1515 [inline]
 __blk_mq_delay_run_hw_queue+0x207/0x420 block/blk-mq.c:1592
 blk_mq_run_hw_queue+0x231/0x260 block/blk-mq.c:1645
 blk_mq_sched_insert_requests+0x144/0x210 block/blk-mq-sched.c:501
 blk_mq_flush_plug_list+0x2f5/0x400 block/blk-mq.c:1915
 blk_flush_plug_list+0x235/0x260 block/blk-core.c:1755
 blk_finish_plug+0x44/0x60 block/blk-core.c:1772
 ext4_writepages+0x18dd/0x1e70 fs/ext4/inode.c:2852
 do_writepages+0x7b/0x150 mm/page-writeback.c:2352
 __filemap_fdatawrite_range+0x19d/0x1d0 mm/filemap.c:422
 file_write_and_wait_range+0x9f/0x120 mm/filemap.c:761
 ext4_sync_file+0x105/0x6e0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:200
 generic_write_sync include/linux/fs.h:2737 [inline]
 ext4_buffered_write_iter+0x38f/0x3e0 fs/ext4/file.c:278
 ext4_file_write_iter+0x47a/0x1060 fs/ext4/file.c:503
 call_write_iter include/linux/fs.h:1901 [inline]
 do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
 do_iter_write+0x112/0x4c0 fs/read_write.c:866
 vfs_iter_write+0x4c/0x70 fs/read_write.c:907
 iter_file_splice_write+0x41a/0x770 fs/splice.c:686
 do_splice_from fs/splice.c:764 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:933
 splice_direct_to_actor+0x345/0x650 fs/splice.c:888
 do_splice_direct+0xf5/0x170 fs/splice.c:976
 do_sendfile+0x5e0/0xcf0 fs/read_write.c:1257
 __do_sys_sendfile64 fs/read_write.c:1318 [inline]
 __se_sys_sendfile64 fs/read_write.c:1304 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1304
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8881039b1aa8 of 8 bytes by task 19638 on cpu 0:
 list_empty_careful include/linux/list.h:319 [inline]
 dd_has_work+0xfe/0x110 block/mq-deadline.c:590
 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:135 [inline]
 blk_mq_do_dispatch_sched+0x138/0x610 block/blk-mq-sched.c:199
 __blk_mq_sched_dispatch_requests+0x1fd/0x2a0 block/blk-mq-sched.c:310
 blk_mq_sched_dispatch_requests+0x9f/0x110 block/blk-mq-sched.c:341
 __blk_mq_run_hw_queue block/blk-mq.c:1515 [inline]
 __blk_mq_delay_run_hw_queue+0x207/0x420 block/blk-mq.c:1592
 blk_mq_run_hw_queue+0x231/0x260 block/blk-mq.c:1645
 blk_mq_sched_insert_requests+0x144/0x210 block/blk-mq-sched.c:501
 blk_mq_flush_plug_list+0x2f5/0x400 block/blk-mq.c:1915
 blk_flush_plug_list+0x235/0x260 block/blk-core.c:1755
 blk_finish_plug+0x44/0x60 block/blk-core.c:1772
 ext4_writepages+0x18dd/0x1e70 fs/ext4/inode.c:2852
 do_writepages+0x7b/0x150 mm/page-writeback.c:2352
 __filemap_fdatawrite_range+0x19d/0x1d0 mm/filemap.c:422
 file_write_and_wait_range+0x9f/0x120 mm/filemap.c:761
 ext4_sync_file+0x105/0x6e0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:200
 generic_write_sync include/linux/fs.h:2737 [inline]
 ext4_buffered_write_iter+0x38f/0x3e0 fs/ext4/file.c:278
 ext4_file_write_iter+0x47a/0x1060 fs/ext4/file.c:503
 call_write_iter include/linux/fs.h:1901 [inline]
 do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
 do_iter_write+0x112/0x4c0 fs/read_write.c:866
 vfs_iter_write+0x4c/0x70 fs/read_write.c:907
 iter_file_splice_write+0x41a/0x770 fs/splice.c:686
 do_splice_from fs/splice.c:764 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:933
 splice_direct_to_actor+0x345/0x650 fs/splice.c:888
 do_splice_direct+0xf5/0x170 fs/splice.c:976
 do_sendfile+0x5e0/0xcf0 fs/read_write.c:1257
 __do_sys_sendfile64 fs/read_write.c:1318 [inline]
 __se_sys_sendfile64 fs/read_write.c:1304 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1304
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 19638 Comm: syz-executor.1 Not tainted 5.11.0-rc6-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 2021/02/05 01:35 upstream 5c279c4cf206 23a562df .config log report info KCSAN: data-race in dd_has_work / deadline_remove_request