================================================================== BUG: KCSAN: data-race in dd_has_work / dd_insert_request write to 0xffff88810282a698 of 8 bytes by task 29883 on cpu 1: __list_add include/linux/list.h:72 [inline] list_add_tail include/linux/list.h:102 [inline] dd_insert_request+0x438/0x570 block/mq-deadline.c:759 dd_insert_requests+0xfc/0x140 block/mq-deadline.c:778 blk_mq_sched_insert_requests+0xc0/0x2a0 block/blk-mq-sched.c:477 blk_mq_dispatch_plug_list+0x1e9/0x2c0 block/blk-mq.c:2648 blk_mq_flush_plug_list+0x2ea/0x340 block/blk-mq.c:2690 __blk_flush_plug+0x25a/0x2b0 block/blk-core.c:1219 blk_finish_plug+0x44/0x60 block/blk-core.c:1243 __iomap_dio_rw+0xc5a/0xf40 fs/iomap/direct-io.c:599 iomap_dio_rw+0x38/0x80 fs/iomap/direct-io.c:679 ext4_dio_write_iter fs/ext4/file.c:566 [inline] ext4_file_write_iter+0x7df/0xdf0 fs/ext4/file.c:677 do_iter_readv_writev+0x27b/0x300 do_iter_write+0x16f/0x5c0 fs/read_write.c:852 vfs_iter_write+0x4c/0x70 fs/read_write.c:893 iter_file_splice_write+0x44a/0x7c0 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/0x660 fs/splice.c:891 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+0x46/0xb0 read to 0xffff88810282a698 of 8 bytes by task 29890 on cpu 0: list_empty_careful include/linux/list.h:329 [inline] dd_has_work_for_prio block/mq-deadline.c:838 [inline] dd_has_work+0x188/0x260 block/mq-deadline.c:847 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:109 [inline] blk_mq_do_dispatch_sched+0x148/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:2025 __blk_mq_delay_run_hw_queue+0x194/0x390 block/blk-mq.c:2102 blk_mq_run_hw_queue+0x180/0x310 block/blk-mq.c:2153 blk_mq_sched_insert_requests+0x1cb/0x2a0 block/blk-mq-sched.c:493 blk_mq_dispatch_plug_list+0x1e9/0x2c0 block/blk-mq.c:2648 blk_mq_flush_plug_list+0x2ea/0x340 block/blk-mq.c:2690 __blk_flush_plug+0x25a/0x2b0 block/blk-core.c:1219 blk_finish_plug+0x44/0x60 block/blk-core.c:1243 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] file_write_and_wait_range+0xd6/0x170 mm/filemap.c:779 ext4_sync_file+0xad/0x560 fs/ext4/fsync.c:151 vfs_fsync_range+0x107/0x120 fs/sync.c:188 generic_write_sync include/linux/fs.h:2734 [inline] ext4_buffered_write_iter+0x23f/0x280 fs/ext4/file.c:277 ext4_file_write_iter+0x211/0xdf0 do_iter_readv_writev+0x27b/0x300 do_iter_write+0x16f/0x5c0 fs/read_write.c:852 vfs_iter_write+0x4c/0x70 fs/read_write.c:893 iter_file_splice_write+0x44a/0x7c0 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/0x660 fs/splice.c:891 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+0x46/0xb0 value changed: 0xffff88810282a690 -> 0xffff888103231088 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 29890 Comm: syz-executor.0 Tainted: G W 5.18.0-syzkaller-01444-g0350785b0a09-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ================================================================== syz-executor.0 (29890) used greatest stack depth: 9728 bytes left