]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ALSA: seq: Remove spurious WARN_ON() at timer check
authorTakashi Iwai <tiwai@suse.de>
Thu, 30 Nov 2017 09:08:28 +0000 (10:08 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 30 Nov 2017 09:08:28 +0000 (10:08 +0100)
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

index 37d9cfbc29f9c829facd29ffdc2224ada7a63efd..b80985fbc334cc6598d7ca2953d1ce79edb9f68b 100644 (file)
@@ -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;