Skip to content

Commit

Permalink
ALSA: seq: Remove spurious WARN_ON() at timer check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tiwai committed Nov 30, 2017
1 parent 4fbd8d1 commit 43a3542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/core/seq/seq_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 43a3542

Please sign in to comment.