================================================================== BUG: KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf write to 0xffff88811fd54438 of 8 bytes by task 11951 on cpu 0: relay_switch_subbuf+0x478/0x490 kernel/relay.c:790 relay_reserve include/linux/relay.h:261 [inline] __blk_add_trace+0x801/0x840 kernel/trace/blktrace.c:272 blk_add_trace_bio_remap+0x1d9/0x200 kernel/trace/blktrace.c:1005 trace_block_bio_remap include/trace/events/block.h:559 [inline] blk_partition_remap block/blk-core.c:859 [inline] generic_make_request_checks+0xbf1/0x1130 block/blk-core.c:899 generic_make_request+0x3e/0x740 block/blk-core.c:1018 submit_bio+0x96/0x3c0 block/blk-core.c:1190 submit_bh_wbc+0x40f/0x460 fs/buffer.c:3095 submit_bh fs/buffer.c:3101 [inline] __sync_dirty_buffer+0xd3/0x210 fs/buffer.c:3187 sync_dirty_buffer+0x24/0x40 fs/buffer.c:3200 ext4_write_inode+0x312/0x330 fs/ext4/inode.c:5427 write_inode fs/fs-writeback.c:1312 [inline] __writeback_single_inode+0x6f7/0x8e0 fs/fs-writeback.c:1511 writeback_single_inode+0x232/0x310 fs/fs-writeback.c:1565 sync_inode fs/fs-writeback.c:2602 [inline] sync_inode_metadata+0x74/0xa0 fs/fs-writeback.c:2622 __generic_file_fsync+0x122/0x190 fs/libfs.c:1011 ext4_sync_file+0x48e/0xb00 fs/ext4/fsync.c:120 vfs_fsync_range+0x82/0x150 fs/sync.c:197 generic_write_sync include/linux/fs.h:2853 [inline] ext4_file_write_iter+0x45b/0xa00 fs/ext4/file.c:279 call_write_iter include/linux/fs.h:1895 [inline] do_iter_readv_writev+0x487/0x5b0 fs/read_write.c:693 do_iter_write fs/read_write.c:970 [inline] do_iter_write+0x13b/0x3c0 fs/read_write.c:951 vfs_iter_write+0x5c/0x80 fs/read_write.c:983 iter_file_splice_write+0x4c0/0x7f0 fs/splice.c:746 do_splice_from fs/splice.c:848 [inline] direct_splice_actor+0xa0/0xc0 fs/splice.c:1020 splice_direct_to_actor+0x215/0x510 fs/splice.c:975 do_splice_direct+0x161/0x1e0 fs/splice.c:1063 do_sendfile+0x384/0x7f0 fs/read_write.c:1464 __do_sys_sendfile64 fs/read_write.c:1519 [inline] __se_sys_sendfile64 fs/read_write.c:1511 [inline] __x64_sys_sendfile64+0xbe/0x140 fs/read_write.c:1511 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 write to 0xffff88811fd54438 of 8 bytes by interrupt on cpu 1: relay_switch_subbuf+0x478/0x490 kernel/relay.c:790 relay_reserve include/linux/relay.h:261 [inline] __blk_add_trace+0x801/0x840 kernel/trace/blktrace.c:272 blk_add_trace_rq+0x15b/0x1a0 kernel/trace/blktrace.c:813 blk_add_trace_rq_complete+0xf4/0x110 kernel/trace/blktrace.c:842 trace_block_rq_complete include/trace/events/block.h:116 [inline] blk_update_request+0x232/0x7b0 block/blk-core.c:1435 blk_mq_end_request+0x3f/0x2b0 block/blk-mq.c:568 blk_flush_complete_seq+0x2cf/0x8e0 block/blk-flush.c:196 flush_end_io+0x2c4/0x450 block/blk-flush.c:247 __blk_mq_end_request+0x185/0x270 block/blk-mq.c:559 scsi_end_request+0x20e/0x3e0 drivers/scsi/scsi_lib.c:613 scsi_io_completion+0x302/0xc80 drivers/scsi/scsi_lib.c:963 scsi_finish_command+0x280/0x380 drivers/scsi/scsi.c:228 scsi_softirq_done+0x259/0x280 drivers/scsi/scsi_lib.c:1477 blk_done_softirq+0x1eb/0x250 block/blk-softirq.c:37 __do_softirq+0x115/0x33f kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0xbb/0xe0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] do_IRQ+0x81/0x130 arch/x86/kernel/irq.c:263 ret_from_intr+0x0/0x19 arch_local_irq_enable arch/x86/include/asm/paravirt.h:766 [inline] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] _raw_spin_unlock_irq+0x4e/0x80 kernel/locking/spinlock.c:199 finish_lock_switch kernel/sched/core.c:3123 [inline] finish_task_switch+0x7b/0x260 kernel/sched/core.c:3223 context_switch kernel/sched/core.c:3387 [inline] __schedule+0x31e/0x690 kernel/sched/core.c:4078 preempt_schedule_common+0x37/0x90 kernel/sched/core.c:4226 preempt_schedule+0x30/0x40 kernel/sched/core.c:4251 ___preempt_schedule+0x16/0x20 arch/x86/entry/thunk_64.S:50 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline] _raw_spin_unlock_irq+0x74/0x80 kernel/locking/spinlock.c:199 spin_unlock_irq include/linux/spinlock.h:388 [inline] blk_insert_flush+0x2b6/0x3a0 block/blk-flush.c:418 blk_mq_make_request+0xb2b/0xf60 block/blk-mq.c:1993 generic_make_request block/blk-core.c:1064 [inline] generic_make_request+0x196/0x740 block/blk-core.c:1006 submit_bio+0x96/0x3c0 block/blk-core.c:1190 submit_bio_wait+0xb8/0x100 block/bio.c:972 blkdev_issue_flush+0x163/0x1c0 block/blk-flush.c:459 ext4_sync_file+0x77c/0xb00 fs/ext4/fsync.c:157 vfs_fsync_range+0x82/0x150 fs/sync.c:197 generic_write_sync include/linux/fs.h:2853 [inline] ext4_file_write_iter+0x45b/0xa00 fs/ext4/file.c:279 call_write_iter include/linux/fs.h:1895 [inline] do_iter_readv_writev+0x487/0x5b0 fs/read_write.c:693 do_iter_write fs/read_write.c:970 [inline] do_iter_write+0x13b/0x3c0 fs/read_write.c:951 vfs_iter_write+0x5c/0x80 fs/read_write.c:983 iter_file_splice_write+0x4c0/0x7f0 fs/splice.c:746 do_splice_from fs/splice.c:848 [inline] direct_splice_actor+0xa0/0xc0 fs/splice.c:1020 splice_direct_to_actor+0x215/0x510 fs/splice.c:975 do_splice_direct+0x161/0x1e0 fs/splice.c:1063 do_sendfile+0x384/0x7f0 fs/read_write.c:1464 __do_sys_sendfile64 fs/read_write.c:1519 [inline] __se_sys_sendfile64 fs/read_write.c:1511 [inline] __x64_sys_sendfile64+0xbe/0x140 fs/read_write.c:1511 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 11941 Comm: syz-executor.0 Not tainted 5.4.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ==================================================================