KCSAN: data-race in wb_timer_fn / wbt_wait (2)

4 views
Skip to first unread message

syzbot

unread,
Dec 7, 2020, 6:39:12 AM12/7/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 131ad0b6 Merge tag 'acpi-5.10-rc5' of git://git.kernel.org..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14c46046500000
kernel config: https://syzkaller.appspot.com/x/.config?x=e9a6e9171a00e85a
dashboard link: https://syzkaller.appspot.com/bug?extid=0326f024035805c27067
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+0326f0...@syzkaller.appspotmail.com

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

write to 0xffff888103760a04 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_restore_fl arch/x86/include/asm/irqflags.h:41 [inline]
arch_local_irq_restore arch/x86/include/asm/irqflags.h:84 [inline]
kcsan_setup_watchpoint+0x1ec/0x4d0 kernel/kcsan/core.c:591
tomoyo_domain_quota_is_ok+0xd7/0x2d0 security/tomoyo/util.c:1059
tomoyo_supervisor+0x1f4/0xb20 security/tomoyo/common.c:2089
tomoyo_audit_path_log security/tomoyo/file.c:168 [inline]
tomoyo_path_permission security/tomoyo/file.c:587 [inline]
tomoyo_path_perm+0x261/0x330 security/tomoyo/file.c:838
tomoyo_inode_getattr+0x18/0x20 security/tomoyo/tomoyo.c:123
security_inode_getattr+0x7f/0xd0 security/security.c:1279
vfs_getattr fs/stat.c:121 [inline]
vfs_statx+0xf8/0x270 fs/stat.c:189
vfs_fstatat fs/stat.c:207 [inline]
vfs_lstat include/linux/fs.h:3125 [inline]
__do_sys_newlstat fs/stat.c:362 [inline]
__se_sys_newlstat+0x46/0x250 fs/stat.c:356
__x64_sys_newlstat+0x2d/0x40 fs/stat.c:356
do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888103760a04 of 4 bytes by task 8478 on cpu 1:
rwb_enabled block/blk-wbt.c:80 [inline]
bio_to_wbt_flags block/blk-wbt.c:543 [inline]
wbt_wait+0x36/0x2b0 block/blk-wbt.c:576
__rq_qos_throttle+0x39/0x70 block/blk-rq-qos.c:72
rq_qos_throttle block/blk-rq-qos.h:182 [inline]
blk_mq_submit_bio+0x233/0x1020 block/blk-mq.c:2174
__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
submit_bh_wbc+0x38c/0x3d0 fs/buffer.c:3054
submit_bh fs/buffer.c:3060 [inline]
__sync_dirty_buffer+0x12c/0x1d0 fs/buffer.c:3155
sync_dirty_buffer+0x16/0x20 fs/buffer.c:3168
__ext4_handle_dirty_metadata+0x1d1/0x590 fs/ext4/ext4_jbd2.c:364
ext4_getblk+0x2c7/0x350 fs/ext4/inode.c:873
ext4_bread+0x28/0x130 fs/ext4/inode.c:890
ext4_append+0xd1/0x1b0 fs/ext4/namei.c:67
ext4_init_new_dir+0x177/0x500 fs/ext4/namei.c:2764
ext4_mkdir+0x309/0x6e0 fs/ext4/namei.c:2809
vfs_mkdir+0x288/0x350 fs/namei.c:3650
do_mkdirat+0x132/0x220 fs/namei.c:3673
__do_sys_mkdir fs/namei.c:3689 [inline]
__se_sys_mkdir fs/namei.c:3687 [inline]
__x64_sys_mkdir+0x32/0x40 fs/namei.c:3687
do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 8478 Comm: syz-executor.0 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 25, 2020, 4:31:12 AM12/25/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