[moderation] [block?] [trace?] KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf (6)

3 views
Skip to first unread message

syzbot

unread,
Dec 8, 2023, 7:07:22 PM12/8/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 815fb87b7530 Merge tag 'pm-6.7-rc4' of git://git.kernel.or..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14804ebae80000
kernel config: https://syzkaller.appspot.com/x/.config?x=efc18f367a3f97fa
dashboard link: https://syzkaller.appspot.com/bug?extid=ccce44144bfcb4db1023
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [ax...@kernel.dk linux...@vger.kernel.org linux-...@vger.kernel.org linux-tra...@vger.kernel.org mathieu....@efficios.com mhir...@kernel.org ros...@goodmis.org]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/98392298dffb/disk-815fb87b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4acd42758037/vmlinux-815fb87b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c9706d8d14f0/bzImage-815fb87b.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+ccce44...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in relay_switch_subbuf / relay_switch_subbuf

write to 0xffff88815d978238 of 8 bytes by task 2744 on cpu 0:
relay_switch_subbuf+0x399/0x3a0 kernel/relay.c:708
relay_reserve include/linux/relay.h:248 [inline]
__blk_add_trace+0x665/0x720 kernel/trace/blktrace.c:276
blk_add_trace_bio kernel/trace/blktrace.c:903 [inline]
blk_add_trace_bio_backmerge+0x12c/0x140 kernel/trace/blktrace.c:923
trace_block_bio_backmerge include/trace/events/block.h:361 [inline]
bio_attempt_back_merge+0x4a7/0x500 block/blk-merge.c:985
blk_attempt_bio_merge+0x43d/0x480 block/blk-merge.c:1068
blk_attempt_plug_merge+0xb4/0xf0 block/blk-merge.c:1115
blk_mq_attempt_bio_merge block/blk-mq.c:2853 [inline]
blk_mq_get_new_requests block/blk-mq.c:2873 [inline]
blk_mq_submit_bio+0x3ab/0xd90 block/blk-mq.c:2982
__submit_bio+0x11c/0x350 block/blk-core.c:607
__submit_bio_noacct_mq block/blk-core.c:686 [inline]
submit_bio_noacct_nocheck+0x449/0x5e0 block/blk-core.c:715
submit_bio_noacct+0x70c/0x8c0 block/blk-core.c:809
submit_bio+0xb7/0xc0 block/blk-core.c:842
submit_bh_wbc+0x2ca/0x300 fs/buffer.c:2821
submit_bh+0x1c/0x20 fs/buffer.c:2826
jbd2_journal_commit_transaction+0x15f3/0x33a0 fs/jbd2/commit.c:730
kjournald2+0x242/0x420 fs/jbd2/journal.c:201
kthread+0x1d7/0x210 kernel/kthread.c:388
ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

write to 0xffff88815d978238 of 8 bytes by task 27270 on cpu 1:
relay_switch_subbuf+0x399/0x3a0 kernel/relay.c:708
relay_reserve include/linux/relay.h:248 [inline]
__blk_add_trace+0x665/0x720 kernel/trace/blktrace.c:276
blk_add_trace_bio kernel/trace/blktrace.c:903 [inline]
blk_add_trace_getrq+0x12c/0x140 kernel/trace/blktrace.c:940
trace_block_getrq include/trace/events/block.h:394 [inline]
blk_mq_submit_bio+0xd28/0xd90 block/blk-mq.c:2990
__submit_bio+0x11c/0x350 block/blk-core.c:607
__submit_bio_noacct_mq block/blk-core.c:686 [inline]
submit_bio_noacct_nocheck+0x4ad/0x5e0 block/blk-core.c:715
submit_bio_noacct+0x70c/0x8c0 block/blk-core.c:809
submit_bio+0xb7/0xc0 block/blk-core.c:842
ext4_io_submit+0x8a/0xa0 fs/ext4/page-io.c:378
ext4_do_writepages+0xb3a/0x2100 fs/ext4/inode.c:2705
ext4_writepages+0x15e/0x2e0 fs/ext4/inode.c:2774
do_writepages+0x1c2/0x340 mm/page-writeback.c:2553
filemap_fdatawrite_wbc+0xdb/0xf0 mm/filemap.c:387
__filemap_fdatawrite_range mm/filemap.c:420 [inline]
__filemap_fdatawrite mm/filemap.c:426 [inline]
filemap_flush+0x95/0xc0 mm/filemap.c:453
ext4_alloc_da_blocks+0x50/0x130 fs/ext4/inode.c:3077
ext4_release_file+0x5f/0x1c0 fs/ext4/file.c:169
__fput+0x299/0x630 fs/file_table.c:394
____fput+0x15/0x20 fs/file_table.c:422
task_work_run+0x135/0x1a0 kernel/task_work.c:180
exit_task_work include/linux/task_work.h:38 [inline]
do_exit+0x604/0x16d0 kernel/exit.c:871
do_group_exit+0x101/0x150 kernel/exit.c:1021
get_signal+0xf4e/0x10a0 kernel/signal.c:2904
arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:309
exit_to_user_mode_loop+0x6f/0xe0 kernel/entry/common.c:168
exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204
irqentry_exit_to_user_mode+0x9/0x20 kernel/entry/common.c:309
irqentry_exit+0x12/0x40 kernel/entry/common.c:412
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570

value changed: 0x0000000000000038 -> 0x0000000000000030

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 27270 Comm: syz-executor.0 Not tainted 6.7.0-rc3-syzkaller-00284-g815fb87b7530 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages