diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-11-30 04:08:28 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-11-30 04:08:28 -0500 |
commit | 43a3542870328601be02fcc9d27b09db467336ef (patch) | |
tree | db62e66941edf61f3cd54a7f398188f3ed4727bc | |
parent | 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff) |
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>
-rw-r--r-- | sound/core/seq/seq_timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
355 | unsigned long freq; | 355 | unsigned long freq; |
356 | 356 | ||
357 | t = tmr->timeri->timer; | 357 | t = tmr->timeri->timer; |
358 | if (snd_BUG_ON(!t)) | 358 | if (!t) |
359 | return -EINVAL; | 359 | return -EINVAL; |
360 | 360 | ||
361 | freq = tmr->preferred_resolution; | 361 | freq = tmr->preferred_resolution; |