KCSAN: data-race in dd_has_work / dd_insert_request

9 views
Skip to first unread message

syzbot

unread,
Mar 30, 2021, 7:56:20 AM3/30/21
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 1e43c377 Merge tag 'xtensa-20210329' of git://github.com/j..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12a5a426d00000
kernel config: https://syzkaller.appspot.com/x/.config?x=8d3029d8441055c8
dashboard link: https://syzkaller.appspot.com/bug?extid=7cd16c2f3f9c292c2ae7
compiler: Debian clang version 11.0.1-2
CC: [ax...@kernel.dk linux...@vger.kernel.org linux-...@vger.kernel.org]

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

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

==================================================================
BUG: KCSAN: data-race in dd_has_work / dd_insert_request

write to 0xffff888102be2528 of 8 bytes by task 22429 on cpu 0:
__list_add include/linux/list.h:70 [inline]
list_add_tail include/linux/list.h:100 [inline]
dd_insert_request+0x27a/0x430 block/mq-deadline.c:521
dd_insert_requests+0x10c/0x150 block/mq-deadline.c:537
blk_mq_sched_insert_request+0x228/0x240 block/blk-mq-sched.c:448
blk_mq_submit_bio+0x8b1/0x1060 block/blk-mq.c:2243
__submit_bio_noacct_mq block/blk-core.c:1014 [inline]
submit_bio_noacct+0x7c2/0x9a0 block/blk-core.c:1047
submit_bio+0x200/0x370 block/blk-core.c:1118
submit_bh_wbc+0x36b/0x3b0 fs/buffer.c:3055
submit_bh fs/buffer.c:3061 [inline]
__sync_dirty_buffer+0x136/0x1e0 fs/buffer.c:3156
sync_dirty_buffer+0x16/0x20 fs/buffer.c:3169
ext4_write_inode+0x285/0x390 fs/ext4/inode.c:5238
write_inode+0x8c/0x1f0 fs/fs-writeback.c:1320
__writeback_single_inode+0x286/0x4d0 fs/fs-writeback.c:1525
writeback_single_inode+0x122/0x580 fs/fs-writeback.c:1580
sync_inode fs/fs-writeback.c:2624 [inline]
sync_inode_metadata+0x52/0x70 fs/fs-writeback.c:2644
ext4_fsync_nojournal fs/ext4/fsync.c:92 [inline]
ext4_sync_file+0x359/0x6e0 fs/ext4/fsync.c:170
vfs_fsync_range+0x107/0x120 fs/sync.c:200
generic_write_sync include/linux/fs.h:2843 [inline]
ext4_buffered_write_iter+0x38f/0x3e0 fs/ext4/file.c:277
ext4_file_write_iter+0x48a/0x10b0 fs/ext4/file.c:502
call_write_iter include/linux/fs.h:1977 [inline]
do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
do_iter_write+0x112/0x4c0 fs/read_write.c:866
vfs_iter_write+0x4c/0x70 fs/read_write.c:907
iter_file_splice_write+0x40a/0x750 fs/splice.c:689
do_splice_from fs/splice.c:767 [inline]
direct_splice_actor+0x80/0xa0 fs/splice.c:936
splice_direct_to_actor+0x345/0x650 fs/splice.c:891
do_splice_direct+0xf5/0x170 fs/splice.c:979
do_sendfile+0x7a6/0xe20 fs/read_write.c:1260
__do_sys_sendfile64 fs/read_write.c:1319 [inline]
__se_sys_sendfile64 fs/read_write.c:1311 [inline]
__x64_sys_sendfile64+0xa9/0x130 fs/read_write.c:1311
do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888102be2528 of 8 bytes by task 22441 on cpu 1:
list_empty_careful include/linux/list.h:319 [inline]
dd_has_work+0xd3/0xe0 block/mq-deadline.c:586
__blk_mq_do_dispatch_sched block/blk-mq-sched.c:135 [inline]
blk_mq_do_dispatch_sched+0x138/0x610 block/blk-mq-sched.c:199
__blk_mq_sched_dispatch_requests+0x1fd/0x2a0 block/blk-mq-sched.c:310
blk_mq_sched_dispatch_requests+0x9f/0x110 block/blk-mq-sched.c:341
__blk_mq_run_hw_queue+0xc1/0x140 block/blk-mq.c:1488
__blk_mq_delay_run_hw_queue+0x188/0x330 block/blk-mq.c:1565
blk_mq_run_hw_queue+0x231/0x260 block/blk-mq.c:1618
blk_mq_sched_insert_requests+0x144/0x210 block/blk-mq-sched.c:491
blk_mq_flush_plug_list+0x2f5/0x400 block/blk-mq.c:1942
blk_flush_plug_list+0x235/0x260 block/blk-core.c:1749
blk_finish_plug+0x44/0x60 block/blk-core.c:1766
ext4_writepages+0x18dd/0x1e70 fs/ext4/inode.c:2853
do_writepages+0x7b/0x150 mm/page-writeback.c:2352
__filemap_fdatawrite_range+0x19d/0x1d0 mm/filemap.c:424
file_write_and_wait_range+0x9f/0x120 mm/filemap.c:763
ext4_sync_file+0x105/0x6e0 fs/ext4/fsync.c:151
vfs_fsync_range+0x107/0x120 fs/sync.c:200
generic_write_sync include/linux/fs.h:2843 [inline]
ext4_buffered_write_iter+0x38f/0x3e0 fs/ext4/file.c:277
ext4_file_write_iter+0x48a/0x10b0 fs/ext4/file.c:502
call_write_iter include/linux/fs.h:1977 [inline]
do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
do_iter_write+0x112/0x4c0 fs/read_write.c:866
vfs_iter_write+0x4c/0x70 fs/read_write.c:907
iter_file_splice_write+0x40a/0x750 fs/splice.c:689
do_splice_from fs/splice.c:767 [inline]
direct_splice_actor+0x80/0xa0 fs/splice.c:936
splice_direct_to_actor+0x345/0x650 fs/splice.c:891
do_splice_direct+0xf5/0x170 fs/splice.c:979
do_sendfile+0x7a6/0xe20 fs/read_write.c:1260
__do_sys_sendfile64 fs/read_write.c:1319 [inline]
__se_sys_sendfile64 fs/read_write.c:1311 [inline]
__x64_sys_sendfile64+0xa9/0x130 fs/read_write.c:1311
do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 22441 Comm: syz-executor.4 Not tainted 5.12.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================


---
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.

syzbot

unread,
Jul 1, 2022, 4:30:15 AM7/1/22
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