ALSA: pcm: oss: Remove WARNING from snd_pcm_plug_alloc() checks
authorTakashi Iwai <tiwai@suse.de>
Thu, 12 Mar 2020 15:57:30 +0000 (16:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2020 14:34:17 +0000 (16:34 +0200)
commit59dfa43ef54a64c366ffee5e4d39f667352095f9
treed86bcdbbd9e4b0efd9c83fa07832d1bddb6e0e50
parent5ac3462e19212ceca3f0f62effb4fc7aaf7ea4e1
ALSA: pcm: oss: Remove WARNING from snd_pcm_plug_alloc() checks

commit 5461e0530c222129dfc941058be114b5cbc00837 upstream.

The return value checks in snd_pcm_plug_alloc() are covered with
snd_BUG_ON() macro that may trigger a kernel WARNING depending on the
kconfig.  But since the error condition can be triggered by a weird
user space parameter passed to OSS layer, we shouldn't give the kernel
stack trace just for that.  As it's a normal error condition, let's
remove snd_BUG_ON() macro usage there.

Reported-by: syzbot+2a59ee7a9831b264f45e@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200312155730.7520-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/oss/pcm_plugin.c