[alsa-devel] WARNING in initialize_timer
Hello,
syzkaller hit the following crash on 43570f0383d6d5879ae585e6c3cf027ba321546f git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master compiler: gcc (GCC) 7.1.1 20170620 .config is attached Raw console output is attached.
Unfortunately, I don't have any reproducer for this bug yet.
binder: 4519:4521 ioctl 40046205 2 returned -22 binder: 4519:4521 ioctl c0106403 20008ff0 returned -22 WARNING: CPU: 0 PID: 4528 at sound/core/seq/seq_timer.c:358 initialize_timer+0x22d/0x290 sound/core/seq/seq_timer.c:358 Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 4528 Comm: syz-executor7 Not tainted 4.15.0-rc1+ #199 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 panic+0x1e4/0x41c kernel/panic.c:183 __warn+0x1dc/0x200 kernel/panic.c:547 report_bug+0x211/0x2d0 lib/bug.c:184 fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:177 fixup_bug arch/x86/kernel/traps.c:246 [inline] do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:295 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:314 invalid_op+0x18/0x20 arch/x86/entry/entry_64.S:930 RIP: 0010:initialize_timer+0x22d/0x290 sound/core/seq/seq_timer.c:358 RSP: 0018:ffff8801c7dbf880 EFLAGS: 00010012 RAX: 0000000000010000 RBX: ffff8801cdb75800 RCX: ffffffff840e956d RDX: 00000000000006b6 RSI: ffffc90001f35000 RDI: ffff8801cdb75850 RBP: ffff8801c7dbf8a8 R08: ffffffff86445678 R09: 1ffff10038fb7eb9 R10: ffff8801c97be2c0 R11: 0000000000000001 R12: 0000000000000000 R13: 0000000000000286 R14: ffff8801cdb75850 R15: ffff8801d92ecb40 seq_timer_start sound/core/seq/seq_timer.c:391 [inline] snd_seq_timer_start+0x147/0x2b0 sound/core/seq/seq_timer.c:405 snd_seq_queue_process_event sound/core/seq/seq_queue.c:698 [inline] snd_seq_control_queue+0x2b9/0x640 sound/core/seq/seq_queue.c:759 event_input_timer+0x25/0x30 sound/core/seq/seq_system.c:118 snd_seq_deliver_single_event.constprop.11+0x2fb/0x940 sound/core/seq/seq_clientmgr.c:621 snd_seq_deliver_event+0x176/0x840 sound/core/seq/seq_clientmgr.c:822 snd_seq_client_enqueue_event+0x2b6/0x420 sound/core/seq/seq_clientmgr.c:940 snd_seq_write+0x34d/0x720 sound/core/seq/seq_clientmgr.c:1069 __vfs_write+0xef/0x970 fs/read_write.c:480 vfs_write+0x18f/0x510 fs/read_write.c:544 SYSC_write fs/read_write.c:589 [inline] SyS_write+0xef/0x220 fs/read_write.c:581 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x4529d9 RSP: 002b:00007fb9be36ec58 EFLAGS: 00000212 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000758248 RCX: 00000000004529d9 RDX: 0000000000000030 RSI: 0000000020e6ffd0 RDI: 000000000000001c RBP: 00000000000005a2 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f57d0 R13: 00000000ffffffff R14: 00007fb9be36f6d4 R15: 000000000000002a Dumping ftrace buffer: (ftrace buffer empty) Kernel Offset: disabled Rebooting in 86400 seconds..
--- This bug is generated by a dumb bot. It may contain errors. See https://goo.gl/tpsmEJ for details. Direct all questions to syzkaller@googlegroups.com. Please credit me with: Reported-by: syzbot syzkaller@googlegroups.com
syzbot will keep track of this bug report. Once a fix for this bug is committed, please reply to this email with: #syz fix: exact-commit-title To mark this as a duplicate of another syzbot report, please reply with: #syz dup: exact-subject-of-another-report If it's a one-off invalid bug report, please reply with: #syz invalid Note: if the crash happens again, it will cause creation of a new bug report. Note: all commands must start from beginning of the line in the email body.
On Thu, 30 Nov 2017 06:59:01 +0100, syzbot wrote:
Hello,
syzkaller hit the following crash on 43570f0383d6d5879ae585e6c3cf027ba321546f git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master compiler: gcc (GCC) 7.1.1 20170620 .config is attached Raw console output is attached.
Unfortunately, I don't have any reproducer for this bug yet.
binder: 4519:4521 ioctl 40046205 2 returned -22 binder: 4519:4521 ioctl c0106403 20008ff0 returned -22 WARNING: CPU: 0 PID: 4528 at sound/core/seq/seq_timer.c:358 initialize_timer+0x22d/0x290 sound/core/seq/seq_timer.c:358
This must be a spurious WARN_ON() when a slave timer is used while the master is freed.
I'm going to queue the patch below.
#syz fix: ALSA: seq: Remove spurious WARN_ON() at timer check
thanks,
Takashi
-- 8< -- From: Takashi Iwai tiwai@suse.de Subject: [PATCH] ALSA: seq: Remove spurious WARN_ON() at timer check
The use of snd_BUG_ON() in ALSA sequencer timer may lead to a spurious WARN_ON() when a slave timer is deployed as its backend and a corresponding master timer stops meanwhile. The symptom was triggered by syzkaller spontaneously.
Since the NULL timer is valid there, rip off snd_BUG_ON().
Reported-by: syzbot syzkaller@googlegroups.com Cc: stable@vger.kernel.org Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/core/seq/seq_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/core/seq/seq_timer.c b/sound/core/seq/seq_timer.c index 37d9cfbc29f9..b80985fbc334 100644 --- a/sound/core/seq/seq_timer.c +++ b/sound/core/seq/seq_timer.c @@ -355,7 +355,7 @@ static int initialize_timer(struct snd_seq_timer *tmr) unsigned long freq;
t = tmr->timeri->timer; - if (snd_BUG_ON(!t)) + if (!t) return -EINVAL;
freq = tmr->preferred_resolution;
participants (2)
-
syzbot
-
Takashi Iwai