[moderation] [block?] KCSAN: data-race in blk_mq_rq_ctx_init / bt_tags_for_each

0 views
Skip to first unread message

syzbot

unread,
Dec 11, 2023, 7:01:30 PM12/11/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 98b1cc82c4af Linux 6.7-rc2
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12d5cdb8e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=8c1151391aefc0c3
dashboard link: https://syzkaller.appspot.com/bug?extid=fbf5308631c96a18b0ad
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]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/b63fb347c844/disk-98b1cc82.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a75961292759/vmlinux-98b1cc82.xz
kernel image: https://storage.googleapis.com/syzbot-assets/52ef29cc01f9/bzImage-98b1cc82.xz

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

==================================================================
BUG: KCSAN: data-race in blk_mq_rq_ctx_init / bt_tags_for_each

write to 0xffff888102691a20 of 4 bytes by task 2880 on cpu 0:
blk_mq_rq_ctx_init+0x193/0x300 block/blk-mq.c:371
__blk_mq_alloc_requests+0x7ce/0x9e0 block/blk-mq.c:517
blk_mq_get_new_requests block/blk-mq.c:2872 [inline]
blk_mq_submit_bio+0x468/0xd90 block/blk-mq.c:2970
__submit_bio+0x11c/0x350 block/blk-core.c:599
__submit_bio_noacct_mq block/blk-core.c:678 [inline]
submit_bio_noacct_nocheck+0x449/0x5e0 block/blk-core.c:707
submit_bio_noacct+0x71c/0x8c0 block/blk-core.c:801
submit_bio+0xb7/0xc0 block/blk-core.c:834
iomap_dio_submit_bio fs/iomap/direct-io.c:80 [inline]
iomap_dio_bio_iter+0xa50/0xbe0 fs/iomap/direct-io.c:417
__iomap_dio_rw+0x8db/0x1090 fs/iomap/direct-io.c:659
iomap_dio_rw+0x40/0x90 fs/iomap/direct-io.c:748
ext4_dio_write_iter fs/ext4/file.c:575 [inline]
ext4_file_write_iter+0xa8a/0xe10 fs/ext4/file.c:694
call_write_iter include/linux/fs.h:2020 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x48a/0x790 fs/read_write.c:584
ksys_write+0xeb/0x1a0 fs/read_write.c:637
__do_sys_write fs/read_write.c:649 [inline]
__se_sys_write fs/read_write.c:646 [inline]
__x64_sys_write+0x42/0x50 fs/read_write.c:646
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff888102691a20 of 4 bytes by task 2878 on cpu 1:
blk_mq_find_and_get_req block/blk-mq-tag.c:260 [inline]
bt_tags_iter block/blk-mq-tag.c:356 [inline]
__sbitmap_for_each_set include/linux/sbitmap.h:281 [inline]
sbitmap_for_each_set include/linux/sbitmap.h:302 [inline]
bt_tags_for_each+0x2e2/0x500 block/blk-mq-tag.c:391
__blk_mq_all_tag_iter block/blk-mq-tag.c:402 [inline]
blk_mq_tagset_busy_iter+0x114/0x150 block/blk-mq-tag.c:446
scsi_host_busy+0x4f/0x80 drivers/scsi/hosts.c:604
scsi_host_queue_ready drivers/scsi/scsi_lib.c:1341 [inline]
scsi_queue_rq+0x310/0x1a30 drivers/scsi/scsi_lib.c:1735
blk_mq_dispatch_rq_list+0x2d9/0x1090 block/blk-mq.c:2037
__blk_mq_sched_dispatch_requests+0x1ce/0xd20 block/blk-mq-sched.c:301
blk_mq_sched_dispatch_requests+0x99/0x100 block/blk-mq-sched.c:333
blk_mq_run_hw_queue+0x2a4/0x4c0 block/blk-mq.c:2252
blk_mq_flush_plug_list+0x7b6/0xdc0 block/blk-mq.c:2800
blk_add_rq_to_plug+0x108/0x3e0 block/blk-mq.c:1294
blk_mq_submit_bio+0x61a/0xd90 block/blk-mq.c:2996
__submit_bio+0x11c/0x350 block/blk-core.c:599
__submit_bio_noacct_mq block/blk-core.c:678 [inline]
submit_bio_noacct_nocheck+0x4ad/0x5e0 block/blk-core.c:707
submit_bio_noacct+0x71c/0x8c0 block/blk-core.c:801
submit_bio+0xb7/0xc0 block/blk-core.c:834
iomap_dio_submit_bio fs/iomap/direct-io.c:80 [inline]
iomap_dio_bio_iter+0xa50/0xbe0 fs/iomap/direct-io.c:417
__iomap_dio_rw+0x8db/0x1090 fs/iomap/direct-io.c:659
iomap_dio_rw+0x40/0x90 fs/iomap/direct-io.c:748
ext4_dio_write_iter fs/ext4/file.c:575 [inline]
ext4_file_write_iter+0xa8a/0xe10 fs/ext4/file.c:694
call_write_iter include/linux/fs.h:2020 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x48a/0x790 fs/read_write.c:584
ksys_write+0xeb/0x1a0 fs/read_write.c:637
__do_sys_write fs/read_write.c:649 [inline]
__se_sys_write fs/read_write.c:646 [inline]
__x64_sys_write+0x42/0x50 fs/read_write.c:646
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x00001f6c -> 0xffffffff

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 2878 Comm: syz-executor.2 Not tainted 6.7.0-rc2-syzkaller #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

syzbot

unread,
Dec 26, 2023, 1:09:14 PM12/26/23
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages