syzbot


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

Status: auto-closed as invalid on 2020/11/04 06:43
Subsystems: block
[Documentation on labels]
First crash: 1321d, last: 1296d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in blk_stat_add / blk_stat_timer_fn (5) block 12 1176d 1167d 0/26 auto-closed as invalid on 2021/03/03 15:50
upstream KCSAN: data-race in blk_stat_add / blk_stat_timer_fn (3) block 2 1385d 1385d 0/26 auto-closed as invalid on 2020/08/07 01:06
upstream KCSAN: data-race in blk_stat_add / blk_stat_timer_fn (6) block 2 1120d 1130d 0/26 auto-closed as invalid on 2021/05/17 11:06
upstream KCSAN: data-race in blk_stat_add / blk_stat_timer_fn block 10 1621d 1637d 0/26 closed as invalid on 2019/11/19 14:44
upstream KCSAN: data-race in blk_stat_add / blk_stat_timer_fn (2) block 22 1471d 1611d 0/26 auto-closed as invalid on 2020/06/16 18:43

Sample crash report:
==================================================================
BUG: KCSAN: data-race in blk_stat_add / blk_stat_timer_fn

write to 0xffffe8ffffc269d8 of 4 bytes by interrupt on cpu 1:
 blk_rq_stat_init block/blk-stat.c:24 [inline]
 blk_stat_timer_fn+0x336/0x410 block/blk-stat.c:95
 call_timer_fn+0x30/0x2a0 kernel/time/timer.c:1413
 expire_timers+0x116/0x290 kernel/time/timer.c:1458
 __run_timers+0x348/0x3e0 kernel/time/timer.c:1755
 run_timer_softirq+0x2e/0x60 kernel/time/timer.c:1768
 __do_softirq+0x198/0x360 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+0x5b/0x70 arch/x86/kernel/irq_64.c:77
 invoke_softirq kernel/softirq.c:393 [inline]
 __irq_exit_rcu+0x115/0x120 kernel/softirq.c:423
 sysvec_apic_timer_interrupt+0xba/0xd0 arch/x86/kernel/apic/apic.c:1091
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:581
 arch_local_irq_enable arch/x86/include/asm/paravirt.h:780 [inline]
 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline]
 _raw_spin_unlock_irq+0x41/0x70 kernel/locking/spinlock.c:199
 finish_lock_switch kernel/sched/core.c:3517 [inline]
 finish_task_switch+0x8b/0x270 kernel/sched/core.c:3617
 context_switch kernel/sched/core.c:3781 [inline]
 __schedule+0x3c5/0x590 kernel/sched/core.c:4527
 schedule+0x91/0xd0 kernel/sched/core.c:4602
 freezable_schedule include/linux/freezer.h:172 [inline]
 do_nanosleep+0x107/0x3a0 kernel/time/hrtimer.c:1883
 hrtimer_nanosleep kernel/time/hrtimer.c:1936 [inline]
 __do_sys_nanosleep kernel/time/hrtimer.c:1970 [inline]
 __se_sys_nanosleep+0x20b/0x2a0 kernel/time/hrtimer.c:1957
 __x64_sys_nanosleep+0x2d/0x40 kernel/time/hrtimer.c:1957
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffffe8ffffc269d8 of 4 bytes by interrupt on cpu 0:
 blk_rq_stat_add block/blk-stat.c:48 [inline]
 blk_stat_add+0x190/0x240 block/blk-stat.c:74
 __blk_mq_end_request+0x142/0x230 block/blk-mq.c:544
 blk_mq_end_request+0x37/0x50 block/blk-mq.c:564
 lo_complete_rq+0xca/0x180 drivers/block/loop.c:500
 blk_done_softirq+0x1a5/0x200 block/blk-mq.c:586
 __do_softirq+0x198/0x360 kernel/softirq.c:298
 run_ksoftirqd+0x2f/0x60 kernel/softirq.c:652
 smpboot_thread_fn+0x347/0x530 kernel/smpboot.c:165
 kthread+0x20d/0x230 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 9 Comm: ksoftirqd/0 Not tainted 5.9.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/09/30 06:43 upstream 02de58b24d2e 8516f6d3 .config console log report info ci2-upstream-kcsan-gce
2020/09/29 11:05 upstream fb0155a09b02 1b88c6d5 .config console log report info ci2-upstream-kcsan-gce
2020/09/21 22:29 upstream 98477740630f 9e1fa68e .config console log report info ci2-upstream-kcsan-gce
2020/09/17 07:03 upstream 5925fa68fe82 8247808b .config console log report info ci2-upstream-kcsan-gce
2020/09/04 09:37 upstream 59126901f200 abf9ba4f .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.