================================================================== BUG: KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf write to 0xffff888136e3d838 of 8 bytes by task 21073 on cpu 1: relay_switch_subbuf+0x39d/0x3b0 kernel/relay.c:711 relay_reserve include/linux/relay.h:248 [inline] __blk_add_trace+0x6ba/0x710 kernel/trace/blktrace.c:275 blk_add_trace_rq kernel/trace/blktrace.c:848 [inline] blk_add_trace_rq_issue+0x1be/0x1d0 kernel/trace/blktrace.c:862 trace_block_rq_issue include/trace/events/block.h:227 [inline] blk_mq_start_request+0x23b/0x280 block/blk-mq.c:1131 scsi_queue_rq+0x13d8/0x1570 drivers/scsi/scsi_lib.c:1744 blk_mq_dispatch_rq_list+0x544/0x1210 block/blk-mq.c:1908 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:173 [inline] blk_mq_do_dispatch_sched+0x49d/0x7f0 block/blk-mq-sched.c:187 __blk_mq_sched_dispatch_requests+0x1cd/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/0x320 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_add_rq_to_plug+0x13f/0x390 block/blk-mq.c:1193 blk_mq_submit_bio+0x91c/0xe40 block/blk-mq.c:2866 __submit_bio+0x130/0x330 block/blk-core.c:661 __submit_bio_noacct_mq block/blk-core.c:738 [inline] submit_bio_noacct_nocheck+0x425/0x480 block/blk-core.c:755 submit_bio_noacct+0x690/0x7f0 block/blk-core.c:862 submit_bio+0xfb/0x110 ext4_io_submit+0x86/0xa0 fs/ext4/page-io.c:378 ext4_writepages+0xaca/0x1d00 fs/ext4/inode.c:2836 do_writepages+0x1db/0x350 mm/page-writeback.c:2443 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+0x105/0x6d0 fs/ext4/fsync.c:151 vfs_fsync_range fs/sync.c:188 [inline] vfs_fsync fs/sync.c:202 [inline] do_fsync fs/sync.c:212 [inline] __do_sys_fdatasync fs/sync.c:225 [inline] __se_sys_fdatasync fs/sync.c:223 [inline] __x64_sys_fdatasync+0x7a/0xd0 fs/sync.c:223 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 write to 0xffff888136e3d838 of 8 bytes by task 21072 on cpu 0: relay_switch_subbuf+0x39d/0x3b0 kernel/relay.c:711 relay_reserve include/linux/relay.h:248 [inline] __blk_add_trace+0x6ba/0x710 kernel/trace/blktrace.c:275 blk_add_trace_bio kernel/trace/blktrace.c:908 [inline] blk_add_trace_getrq+0x13e/0x150 kernel/trace/blktrace.c:945 trace_block_getrq include/trace/events/block.h:366 [inline] blk_mq_submit_bio+0xdef/0xe40 block/blk-mq.c:2846 __submit_bio+0x130/0x330 block/blk-core.c:661 __submit_bio_noacct_mq block/blk-core.c:738 [inline] submit_bio_noacct_nocheck+0x425/0x480 block/blk-core.c:755 submit_bio_noacct+0x690/0x7f0 block/blk-core.c:862 submit_bio+0xfb/0x110 ext4_io_submit fs/ext4/page-io.c:378 [inline] io_submit_add_bh fs/ext4/page-io.c:420 [inline] ext4_bio_write_page+0x5cd/0xb60 fs/ext4/page-io.c:546 mpage_submit_page fs/ext4/inode.c:2102 [inline] mpage_map_and_submit_buffers fs/ext4/inode.c:2348 [inline] mpage_map_and_submit_extent fs/ext4/inode.c:2487 [inline] ext4_writepages+0x1020/0x1d00 fs/ext4/inode.c:2816 do_writepages+0x1db/0x350 mm/page-writeback.c:2443 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+0x105/0x6d0 fs/ext4/fsync.c:151 vfs_fsync_range fs/sync.c:188 [inline] vfs_fsync fs/sync.c:202 [inline] do_fsync fs/sync.c:212 [inline] __do_sys_fdatasync fs/sync.c:225 [inline] __se_sys_fdatasync fs/sync.c:223 [inline] __x64_sys_fdatasync+0x7a/0xd0 fs/sync.c:223 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: 0x0000000000000038 -> 0x0000000000000030 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 21072 Comm: syz-executor.5 Not tainted 5.18.0-syzkaller-10643-g9d004b2f4fea-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ==================================================================