syzbot


KCSAN: data-race in snd_seq_timer_get_cur_tick / snd_seq_timer_interrupt

Status: closed as invalid on 2019/11/19 14:44
Subsystems: sound
[Documentation on labels]
First crash: 2134d, last: 2117d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in snd_seq_timer_get_cur_tick / snd_seq_timer_interrupt (2) sound 6 11 2014d 2103d 0/29 auto-closed as invalid on 2020/05/01 04:38

Sample crash report:
==================================================================
BUG: KCSAN: data-race in snd_seq_timer_get_cur_tick / snd_seq_timer_interrupt

write to 0xffff8880a68f1198 of 4 bytes by interrupt on cpu 1:
 snd_seq_timer_update_tick sound/core/seq/seq_timer.h:58 [inline]
 snd_seq_timer_interrupt+0x202/0x280 sound/core/seq/seq_timer.c:150
 snd_timer_process_callbacks+0x1e4/0x220 sound/core/timer.c:757
 snd_timer_interrupt sound/core/timer.c:880 [inline]
 snd_timer_interrupt+0x483/0x930 sound/core/timer.c:801
 snd_hrtimer_callback+0x18f/0x260 sound/core/hrtimer.c:50
 __run_hrtimer kernel/time/hrtimer.c:1514 [inline]
 __hrtimer_run_queues+0x274/0x5f0 kernel/time/hrtimer.c:1576
 hrtimer_interrupt+0x22a/0x480 kernel/time/hrtimer.c:1638
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1110 [inline]
 smp_apic_timer_interrupt+0xdc/0x280 arch/x86/kernel/apic/apic.c:1135
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830
 arch_local_irq_enable arch/x86/include/asm/paravirt.h:766 [inline]
 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline]
 _raw_spin_unlock_irq+0x4e/0x80 kernel/locking/spinlock.c:199
 finish_lock_switch kernel/sched/core.c:3123 [inline]
 finish_task_switch+0x7b/0x260 kernel/sched/core.c:3223
 context_switch kernel/sched/core.c:3387 [inline]
 __schedule+0x319/0x640 kernel/sched/core.c:4069
 schedule+0x47/0xd0 kernel/sched/core.c:4136
 schedule_timeout+0x2ca/0x6e0 kernel/time/timer.c:1895
 snd_rawmidi_write+0x576/0x780 sound/core/rawmidi.c:1344
 __vfs_write+0x67/0xc0 fs/read_write.c:494
 vfs_write fs/read_write.c:558 [inline]
 vfs_write+0x18a/0x390 fs/read_write.c:542
 ksys_write+0x17b/0x1b0 fs/read_write.c:611
 __do_sys_write fs/read_write.c:623 [inline]
 __se_sys_write fs/read_write.c:620 [inline]
 __x64_sys_write+0x4c/0x60 fs/read_write.c:620
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880a68f1198 of 4 bytes by task 2493 on cpu 0:
 snd_seq_timer_get_cur_tick+0x21/0x40 sound/core/seq/seq_timer.c:449
 update_timestamp_of_queue+0x93/0x110 sound/core/seq/seq_clientmgr.c:586
 deliver_to_subscribers sound/core/seq/seq_clientmgr.c:691 [inline]
 snd_seq_deliver_event+0x2cd/0x4c0 sound/core/seq/seq_clientmgr.c:828
 snd_seq_kernel_client_dispatch+0xef/0x110 sound/core/seq/seq_clientmgr.c:2323
 snd_vmidi_output_work+0x156/0x200 sound/core/seq/seq_virmidi.c:149
 process_one_work+0x3d4/0x890 kernel/workqueue.c:2269
 worker_thread+0xa0/0x800 kernel/workqueue.c:2415
 kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 2493 Comm: kworker/0:1H Not tainted 5.4.0-rc6+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events_highpri snd_vmidi_output_work
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/10 03:41 https://github.com/google/ktsan.git kcsan 94c006602e13 dc438b91 .config console log report ci2-upstream-kcsan-gce
2019/11/02 23:42 https://github.com/google/ktsan.git kcsan 05f2236801fe d603afc9 .config console log report ci2-upstream-kcsan-gce
2019/10/25 19:02 https://github.com/google/ktsan.git kcsan 05f2236801fe 04ca72cd .config console log report ci2-upstream-kcsan-gce
2019/10/24 11:49 https://github.com/google/ktsan.git kcsan 05f2236801fe d01bb02a .config console log report ci2-upstream-kcsan-gce
2019/10/23 12:41 https://github.com/google/ktsan.git kcsan 05f2236801fe d0686497 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.