KCSAN: data-race in wb_timer_fn / wbt_issue (3)

6 views
Skip to first unread message

syzbot

unread,
Dec 7, 2020, 7:02:11 AM12/7/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: a349e4c6 Merge tag 'xfs-5.10-fixes-7' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=152c4105500000
kernel config: https://syzkaller.appspot.com/x/.config?x=89a86a84f1254241
dashboard link: https://syzkaller.appspot.com/bug?extid=c4b4df9451c5acbae51a
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project.git 913f6005669cfb590c99865a90bc51ed0983d09d)
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+c4b4df...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in wb_timer_fn / wbt_issue

write to 0xffff8881039ec304 of 4 bytes by interrupt on cpu 0:
calc_wb_limits block/blk-wbt.c:304 [inline]
scale_up block/blk-wbt.c:313 [inline]
wb_timer_fn+0x403/0xa00 block/blk-wbt.c:382
blk_stat_timer_fn+0x3f4/0x410 block/blk-stat.c:99
call_timer_fn+0x2e/0x240 kernel/time/timer.c:1410
expire_timers+0x116/0x260 kernel/time/timer.c:1455
__run_timers+0x338/0x3d0 kernel/time/timer.c:1747
run_timer_softirq+0x19/0x30 kernel/time/timer.c:1760
__do_softirq+0x12c/0x2b1 kernel/softirq.c:298
asm_call_irq_on_stack+0xf/0x20
__run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
do_softirq_own_stack+0x32/0x40 arch/x86/kernel/irq_64.c:77
invoke_softirq kernel/softirq.c:393 [inline]
__irq_exit_rcu+0xb2/0xc0 kernel/softirq.c:423
sysvec_apic_timer_interrupt+0x74/0x90 arch/x86/kernel/apic/apic.c:1091
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:631
native_safe_halt arch/x86/include/asm/irqflags.h:60 [inline]
arch_safe_halt arch/x86/include/asm/irqflags.h:103 [inline]
acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline]
acpi_idle_do_entry drivers/acpi/processor_idle.c:517 [inline]
acpi_idle_enter+0x25b/0x2e0 drivers/acpi/processor_idle.c:648
cpuidle_enter_state+0x2bd/0x750 drivers/cpuidle/cpuidle.c:237
cpuidle_enter+0x3c/0x60 drivers/cpuidle/cpuidle.c:351
call_cpuidle kernel/sched/idle.c:132 [inline]
cpuidle_idle_call kernel/sched/idle.c:213 [inline]
do_idle+0x193/0x230 kernel/sched/idle.c:273
cpu_startup_entry+0x15/0x20 kernel/sched/idle.c:369
rest_init+0xd7/0xe0 init/main.c:721
arch_call_rest_init+0xa/0xb
start_kernel+0x5a0/0x625 init/main.c:1061
secondary_startup_64_no_verify+0xb0/0xbb

read to 0xffff8881039ec304 of 4 bytes by task 26254 on cpu 1:
rwb_enabled block/blk-wbt.c:80 [inline]
wbt_issue+0x20/0xd0 block/blk-wbt.c:599
__rq_qos_issue+0x3b/0x70 block/blk-rq-qos.c:54
rq_qos_issue block/blk-rq-qos.h:159 [inline]
blk_mq_start_request+0xc2/0x220 block/blk-mq.c:740
scsi_queue_rq+0x105c/0x1380 drivers/scsi/scsi_lib.c:1684
blk_mq_dispatch_rq_list+0x4cc/0xd30 block/blk-mq.c:1388
__blk_mq_do_dispatch_sched block/blk-mq-sched.c:186 [inline]
blk_mq_do_dispatch_sched+0x370/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+0x8f/0xf0 block/blk-mq-sched.c:341
__blk_mq_run_hw_queue+0xee/0x1c0 block/blk-mq.c:1532
__blk_mq_delay_run_hw_queue+0x17d/0x330 block/blk-mq.c:1609
blk_mq_run_hw_queue+0x231/0x260 block/blk-mq.c:1662
blk_mq_sched_insert_requests+0x144/0x210 block/blk-mq-sched.c:501
blk_mq_flush_plug_list+0x2f5/0x400 block/blk-mq.c:1932
blk_flush_plug_list+0x235/0x260 block/blk-core.c:1760
blk_mq_submit_bio+0x81a/0x1020 block/blk-mq.c:2225
__submit_bio_noacct_mq block/blk-core.c:1026 [inline]
submit_bio_noacct+0x77d/0x930 block/blk-core.c:1059
submit_bio+0x1f3/0x360 block/blk-core.c:1129
ext4_io_submit fs/ext4/page-io.c:382 [inline]
io_submit_add_bh fs/ext4/page-io.c:425 [inline]
ext4_bio_write_page+0x958/0xda0 fs/ext4/page-io.c:552
mpage_submit_page fs/ext4/inode.c:2092 [inline]
mpage_map_and_submit_buffers fs/ext4/inode.c:2340 [inline]
mpage_map_and_submit_extent fs/ext4/inode.c:2479 [inline]
ext4_writepages+0xe9b/0x1e30 fs/ext4/inode.c:2792
do_writepages+0x7b/0x150 mm/page-writeback.c:2352
__filemap_fdatawrite_range+0x19d/0x1d0 mm/filemap.c:422
__filemap_fdatawrite mm/filemap.c:430 [inline]
filemap_flush+0x1f/0x30 mm/filemap.c:457
ext4_alloc_da_blocks+0x4a/0x100 fs/ext4/inode.c:3156
ext4_release_file+0x5b/0x1d0 fs/ext4/file.c:142
__fput+0x243/0x4d0 fs/file_table.c:281
____fput+0x11/0x20 fs/file_table.c:314
task_work_run+0x8e/0x110 kernel/task_work.c:151
tracehook_notify_resume include/linux/tracehook.h:188 [inline]
exit_to_user_mode_loop kernel/entry/common.c:164 [inline]
exit_to_user_mode_prepare+0x13c/0x170 kernel/entry/common.c:191
syscall_exit_to_user_mode+0x16/0x30 kernel/entry/common.c:266
do_syscall_64+0x45/0x80 arch/x86/entry/common.c:56
entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 26254 Comm: syz-executor.3 Not tainted 5.10.0-rc4-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,
Dec 26, 2020, 7:57:11 PM12/26/20
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