KCSAN: data-race in blk_stat_add / blk_stat_timer_fn (5)

0 views
Skip to first unread message

syzbot

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

syzbot found the following issue on:

HEAD commit: c84e1efa Merge tag 'asm-generic-fixes-5.10-2' of git://git..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=174d3965500000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9b19d1bde60f8d
dashboard link: https://syzkaller.appspot.com/bug?extid=2b7b6e80a3df1635cd21
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+2b7b6e...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in blk_stat_add / blk_stat_timer_fn

read to 0xffffe8ffffd35508 of 4 bytes by interrupt on cpu 0:
blk_rq_stat_sum block/blk-stat.c:31 [inline]
blk_stat_timer_fn+0x1bf/0x410 block/blk-stat.c:94
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-write to 0xffffe8ffffd35508 of 4 bytes by interrupt on cpu 1:
blk_rq_stat_add block/blk-stat.c:48 [inline]
blk_stat_add+0x189/0x230 block/blk-stat.c:74
__blk_mq_end_request+0x142/0x230 block/blk-mq.c:544
scsi_end_request+0x2ac/0x470 drivers/scsi/scsi_lib.c:603
scsi_io_completion+0x105/0xfb0 drivers/scsi/scsi_lib.c:965
scsi_finish_command+0x26c/0x2b0 drivers/scsi/scsi.c:214
scsi_softirq_done+0xdf/0x440 drivers/scsi/scsi_lib.c:1443
blk_done_softirq+0x145/0x190 block/blk-mq.c:586
__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
common_interrupt+0xb5/0x130 arch/x86/kernel/irq.c:239
asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:622
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
secondary_startup_64_no_verify+0xb0/0xbb

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.10.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.

Marco Elver

unread,
Feb 5, 2021, 11:59:35 AM2/5/21
to syzbot, 'Dmitry Vyukov' via syzkaller-upstream-moderation
#syz upstream
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-upstream-moderation" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-upstream-m...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-upstream-moderation/00000000000002195b05b5de7ca3%40google.com.
Reply all
Reply to author
Forward
0 new messages