KCSAN: data-race in snd_seq_prioq_cell_out / snd_seq_timer_interrupt

6 views
Skip to first unread message

syzbot

unread,
Jan 11, 2020, 7:34:10 AM1/11/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 245a4300 Merge branch 'rcu/kcsan' into tip/locking/kcsan
git tree: https://github.com/google/ktsan.git kcsan
console output: https://syzkaller.appspot.com/x/log.txt?x=167316aee00000
kernel config: https://syzkaller.appspot.com/x/.config?x=a4b9db179318d21f
dashboard link: https://syzkaller.appspot.com/bug?extid=fd5e0eaa1a32999173b2
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [all...@lohutok.net alsa-...@alsa-project.org
gre...@linuxfoundation.org linux-...@vger.kernel.org pe...@perex.cz
rfon...@redhat.com tg...@linutronix.de ti...@suse.com el...@google.com]

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+fd5e0e...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in snd_seq_prioq_cell_out / snd_seq_timer_interrupt

read to 0xffff8880b5a1d018 of 4 bytes by task 7376 on cpu 0:
event_is_ready sound/core/seq/seq_prioq.c:205 [inline]
snd_seq_prioq_cell_out+0x83/0x210 sound/core/seq/seq_prioq.c:225
snd_seq_check_queue+0xce/0x200 sound/core/seq/seq_queue.c:258
snd_seq_enqueue_event+0x163/0x2b0 sound/core/seq/seq_queue.c:330
snd_seq_client_enqueue_event.constprop.0+0x187/0x2a0
sound/core/seq/seq_clientmgr.c:974
snd_seq_write+0x23f/0x4d0 sound/core/seq/seq_clientmgr.c:1093
__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/0x3a0 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff8880b5a1d018 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:750
snd_timer_interrupt sound/core/timer.c:873 [inline]
snd_timer_interrupt+0x483/0x930 sound/core/timer.c:794
snd_hrtimer_callback+0x18f/0x260 sound/core/hrtimer.c:50
__run_hrtimer kernel/time/hrtimer.c:1517 [inline]
__hrtimer_run_queues+0x274/0x5f0 kernel/time/hrtimer.c:1579
hrtimer_interrupt+0x22a/0x480 kernel/time/hrtimer.c:1641
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:829
matching_access kernel/kcsan/encoding.h:90 [inline]
find_watchpoint kernel/kcsan/core.c:105 [inline]
check_access kernel/kcsan/core.c:446 [inline]
__tsan_read4+0x2b/0x100 kernel/kcsan/core.c:588
__rcu_read_lock+0x2a/0x50 kernel/rcu/tree_plugin.h:358
rcu_read_lock include/linux/rcupdate.h:615 [inline]
mntput_no_expire+0x53/0x520 fs/namespace.c:1127
mntput+0x5c/0x90 fs/namespace.c:1195
path_put fs/namei.c:483 [inline]
terminate_walk+0x118/0x250 fs/namei.c:596
path_openat+0x102b/0x3580 fs/namei.c:3541
do_filp_open+0x11e/0x1b0 fs/namei.c:3567
do_sys_open+0x3b3/0x4f0 fs/open.c:1097
__do_sys_open fs/open.c:1115 [inline]
__se_sys_open fs/open.c:1110 [inline]
__x64_sys_open+0x55/0x70 fs/open.c:1110
do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 7380 Comm: syz-executor.4 Not tainted 5.5.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
==================================================================


---
This bug 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 bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
Reply all
Reply to author
Forward
0 new messages