================================================================== BUG: KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf write to 0xffff88813cf17638 of 8 bytes by interrupt 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_rq kernel/trace/blktrace.c:848 [inline] blk_add_trace_rq_complete+0x1af/0x1c0 kernel/trace/blktrace.c:880 trace_block_rq_complete include/trace/events/block.h:147 [inline] blk_update_request+0x807/0x850 block/blk-mq.c:864 scsi_end_request+0x52/0x470 drivers/scsi/scsi_lib.c:541 scsi_io_completion+0x95/0x1f0 drivers/scsi/scsi_lib.c:979 scsi_finish_command+0x1b7/0x1c0 drivers/scsi/scsi.c:198 scsi_complete+0x19e/0x1d0 drivers/scsi/scsi_lib.c:1446 blk_complete_reqs block/blk-mq.c:1099 [inline] blk_done_softirq+0x92/0xc0 block/blk-mq.c:1104 __do_softirq+0xf2/0x2c7 kernel/softirq.c:571 __irq_exit_rcu kernel/softirq.c:650 [inline] irq_exit_rcu+0x41/0x70 kernel/softirq.c:662 common_interrupt+0x9f/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:640 kcsan_setup_watchpoint+0x3e9/0x3f0 kernel/kcsan/core.c:694 batadv_nc_purge_paths+0x283/0x2c0 net/batman-adv/network-coding.c:437 batadv_nc_worker+0x45b/0xc00 net/batman-adv/network-coding.c:722 process_one_work+0x3d3/0x720 kernel/workqueue.c:2289 worker_thread+0x618/0xa70 kernel/workqueue.c:2436 kthread+0x1a9/0x1e0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 write to 0xffff88813cf17638 of 8 bytes by task 21937 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_insert+0x1b2/0x1c0 kernel/trace/blktrace.c:855 trace_block_rq_insert include/trace/events/block.h:213 [inline] dd_insert_request+0x30b/0x570 block/mq-deadline.c:744 dd_insert_requests+0xfc/0x140 block/mq-deadline.c:781 blk_mq_sched_insert_requests+0xc0/0x2a0 block/blk-mq-sched.c:477 blk_mq_dispatch_plug_list+0x1e9/0x2c0 block/blk-mq.c:2694 blk_mq_flush_plug_list+0x2ea/0x340 block/blk-mq.c:2736 blk_add_rq_to_plug+0x142/0x390 block/blk-mq.c:1264 blk_mq_submit_bio+0x90b/0xe90 block/blk-mq.c:2927 __submit_bio block/blk-core.c:590 [inline] __submit_bio_noacct_mq block/blk-core.c:667 [inline] submit_bio_noacct_nocheck+0x83d/0xaa0 block/blk-core.c:684 submit_bio_noacct+0x6a5/0x810 block/blk-core.c:790 submit_bio+0xfb/0x110 block/blk-core.c:826 ext4_io_submit+0x86/0xa0 fs/ext4/page-io.c:378 ext4_writepages+0xaca/0x1cf0 fs/ext4/inode.c:2854 do_writepages+0x1db/0x350 mm/page-writeback.c:2469 filemap_fdatawrite_wbc+0xd6/0xf0 mm/filemap.c:388 __filemap_fdatawrite_range mm/filemap.c:421 [inline] __filemap_fdatawrite mm/filemap.c:427 [inline] filemap_flush+0x93/0xc0 mm/filemap.c:454 ext4_alloc_da_blocks+0x47/0x100 fs/ext4/inode.c:3140 ext4_release_file+0x5b/0x1d0 fs/ext4/file.c:158 __fput+0x245/0x570 fs/file_table.c:320 ____fput+0x11/0x20 fs/file_table.c:348 task_work_run+0xde/0x110 kernel/task_work.c:179 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x5ad/0x1740 kernel/exit.c:820 do_group_exit+0xfe/0x140 kernel/exit.c:950 get_signal+0xb40/0xc60 kernel/signal.c:2858 arch_do_signal_or_restart+0x87/0x2d0 arch/x86/kernel/signal.c:869 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 exc_general_protection+0x321/0x4b0 arch/x86/kernel/traps.c:728 asm_exc_general_protection+0x22/0x30 arch/x86/include/asm/idtentry.h:564 value changed: 0x0000000000000038 -> 0x0000000000000030 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 21937 Comm: syz-executor.1 Not tainted 6.1.0-rc8-syzkaller-00154-g296a7b7eb792-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 ================================================================== syz-executor.1 (21937) used greatest stack depth: 9376 bytes left