================================================================== BUG: KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf write to 0xffff88813c8a3238 of 8 bytes by task 27125 on cpu 0: relay_switch_subbuf+0x39d/0x3b0 kernel/relay.c:708 relay_reserve include/linux/relay.h:248 [inline] __blk_add_trace+0x6a7/0x700 kernel/trace/blktrace.c:276 blk_add_trace_bio_remap+0x169/0x180 kernel/trace/blktrace.c:1025 trace_block_bio_remap include/trace/events/block.h:479 [inline] blk_partition_remap+0x170/0x1b0 block/blk-core.c:554 submit_bio_noacct+0x394/0x810 block/blk-core.c:738 submit_bio+0xfb/0x110 block/blk-core.c:840 ext4_io_submit+0x86/0xa0 fs/ext4/page-io.c:378 ext4_do_writepages+0xb9d/0x1e70 fs/ext4/inode.c:2897 ext4_writepages+0x11b/0x240 fs/ext4/inode.c:2965 do_writepages+0x1db/0x350 mm/page-writeback.c:2581 filemap_fdatawrite_wbc+0xd6/0xf0 mm/filemap.c:388 __filemap_fdatawrite_range mm/filemap.c:421 [inline] file_write_and_wait_range+0xf2/0x190 mm/filemap.c:777 ext4_sync_file+0x105/0x6d0 fs/ext4/fsync.c:151 vfs_fsync_range+0x107/0x120 fs/sync.c:188 generic_write_sync include/linux/fs.h:2882 [inline] ext4_buffered_write_iter+0x398/0x3e0 fs/ext4/file.c:292 ext4_file_write_iter+0x2bb/0x11b0 __kernel_write_iter+0x157/0x380 fs/read_write.c:517 dump_emit_page+0x3de/0x830 fs/coredump.c:864 dump_user_range+0x5e/0x200 fs/coredump.c:915 elf_core_dump+0x1b4f/0x1c60 fs/binfmt_elf.c:2137 do_coredump+0xed7/0x1790 fs/coredump.c:762 get_signal+0xa04/0xc70 kernel/signal.c:2845 arch_do_signal_or_restart+0x85/0x290 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop+0x78/0x130 kernel/entry/common.c:168 exit_to_user_mode_prepare+0x69/0x90 kernel/entry/common.c:203 irqentry_exit_to_user_mode+0x5/0x10 kernel/entry/common.c:309 irqentry_exit+0xe/0x40 kernel/entry/common.c:412 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570 write to 0xffff88813c8a3238 of 8 bytes by task 2701 on cpu 1: relay_switch_subbuf+0x39d/0x3b0 kernel/relay.c:708 relay_reserve include/linux/relay.h:248 [inline] __blk_add_trace+0x6a7/0x700 kernel/trace/blktrace.c:276 blk_add_trace_bio kernel/trace/blktrace.c:907 [inline] blk_add_trace_bio_queue+0x12e/0x140 kernel/trace/blktrace.c:939 trace_block_bio_queue include/trace/events/block.h:355 [inline] submit_bio_noacct+0x7cf/0x810 block/blk-core.c:798 submit_bio+0xfb/0x110 block/blk-core.c:840 submit_bh_wbc+0x2b0/0x2f0 fs/buffer.c:2702 submit_bh+0x18/0x20 fs/buffer.c:2707 jbd2_journal_commit_transaction+0x13f3/0x30b0 fs/jbd2/commit.c:763 kjournald2+0x233/0x420 fs/jbd2/journal.c:210 kthread+0x1a9/0x1e0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 value changed: 0x0000000000000040 -> 0x0000000000000030 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 2701 Comm: jbd2/sda1-8 Tainted: G W 6.1.0-syzkaller-14321-g0a924817d2ed-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 ================================================================== ================================================================== BUG: KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf write to 0xffff88813c8a3238 of 8 bytes by task 27127 on cpu 0: relay_switch_subbuf+0x39d/0x3b0 kernel/relay.c:708 relay_reserve include/linux/relay.h:248 [inline] __blk_add_trace+0x6a7/0x700 kernel/trace/blktrace.c:276 blk_add_trace_rq kernel/trace/blktrace.c:848 [inline] blk_add_trace_rq_issue+0x1b2/0x1c0 kernel/trace/blktrace.c:861 trace_block_rq_issue include/trace/events/block.h:227 [inline] blk_mq_start_request+0x23b/0x280 block/blk-mq.c:1252 scsi_queue_rq+0x13f3/0x15a0 drivers/scsi/scsi_lib.c:1757 blk_mq_dispatch_rq_list+0x997/0x1290 block/blk-mq.c:2056 __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+0x8b/0x150 block/blk-mq.c:2174 __blk_mq_delay_run_hw_queue+0x15b/0x2e0 block/blk-mq.c:2250 blk_mq_run_hw_queue+0x1be/0x350 block/blk-mq.c:2298 blk_mq_sched_insert_requests+0x220/0x300 block/blk-mq-sched.c:493 blk_mq_dispatch_plug_list+0x1e9/0x2c0 block/blk-mq.c:2758 blk_mq_flush_plug_list+0x38a/0x3e0 block/blk-mq.c:2800 __blk_flush_plug+0x25a/0x2b0 block/blk-core.c:1139 blk_finish_plug+0x44/0x60 block/blk-core.c:1163 ext4_do_writepages+0x196d/0x1e70 fs/ext4/inode.c:2928 ext4_writepages+0x11b/0x240 fs/ext4/inode.c:2965 do_writepages+0x1db/0x350 mm/page-writeback.c:2581 filemap_fdatawrite_wbc+0xd6/0xf0 mm/filemap.c:388 __filemap_fdatawrite_range mm/filemap.c:421 [inline] file_write_and_wait_range+0xf2/0x190 mm/filemap.c:777 ext4_sync_file+0x105/0x6d0 fs/ext4/fsync.c:151 vfs_fsync_range+0x107/0x120 fs/sync.c:188 generic_write_sync include/linux/fs.h:2882 [inline] ext4_buffered_write_iter+0x398/0x3e0 fs/ext4/file.c:292 ext4_file_write_iter+0x2bb/0x11b0 __kernel_write_iter+0x157/0x380 fs/read_write.c:517 dump_emit_page+0x3de/0x830 fs/coredump.c:864 dump_user_range+0x5e/0x200 fs/coredump.c:915 elf_core_dump+0x1b4f/0x1c60 fs/binfmt_elf.c:2137 do_coredump+0xed7/0x1790 fs/coredump.c:762 get_signal+0xa04/0xc70 kernel/signal.c:2845 arch_do_signal_or_restart+0x85/0x290 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop+0x78/0x130 kernel/entry/common.c:168 exit_to_user_mode_prepare+0x69/0x90 kernel/entry/common.c:203 irqentry_exit_to_user_mode+0x5/0x10 kernel/entry/common.c:309 irqentry_exit+0xe/0x40 kernel/entry/common.c:412 asm_exc_stack_segment+0x22/0x30 arch/x86/include/asm/idtentry.h:563 write to 0xffff88813c8a3238 of 8 bytes by task 2701 on cpu 1: relay_switch_subbuf+0x39d/0x3b0 kernel/relay.c:708 relay_reserve include/linux/relay.h:248 [inline] __blk_add_trace+0x6a7/0x700 kernel/trace/blktrace.c:276 blk_add_trace_bio kernel/trace/blktrace.c:907 [inline] blk_add_trace_bio_queue+0x12e/0x140 kernel/trace/blktrace.c:939 trace_block_bio_queue include/trace/events/block.h:355 [inline] submit_bio_noacct+0x7cf/0x810 block/blk-core.c:798 submit_bio+0xfb/0x110 block/blk-core.c:840 submit_bh_wbc+0x2b0/0x2f0 fs/buffer.c:2702 submit_bh+0x18/0x20 fs/buffer.c:2707 jbd2_journal_commit_transaction+0x13f3/0x30b0 fs/jbd2/commit.c:763 kjournald2+0x233/0x420 fs/jbd2/journal.c:210 kthread+0x1a9/0x1e0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 value changed: 0x0000000000000040 -> 0x0000000000000030 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 2701 Comm: jbd2/sda1-8 Tainted: G W 6.1.0-syzkaller-14321-g0a924817d2ed-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 ==================================================================