mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: syzbot 
	<bot+f33bd65ef82b2dac666f0d0b79813c222cddb2e9@syzkaller.appspotmail.com>
Cc: <alsa-devel@alsa-project.org>, <syzkaller-bugs@googlegroups.com>,
	<perex@perex.cz>, <linux-kernel@vger.kernel.org>
Subject: Re: WARNING in initialize_timer
Date: Thu, 30 Nov 2017 10:15:02 +0100	[thread overview]
Message-ID: <s5h1skgi0vd.wl-tiwai@suse.de> (raw)
In-Reply-To: <001a1148cc3adcd1e9055f2cf29a@google.com>

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;
-- 
2.15.0

           reply	other threads:[~2017-11-30  9:15 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <001a1148cc3adcd1e9055f2cf29a@google.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h1skgi0vd.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=bot+f33bd65ef82b2dac666f0d0b79813c222cddb2e9@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®