“d861196163e30c07add471562b45dce38517c9b2”上不存在“arch/arm/mach-zynq/include/mach/system.h”
提交 1671a767 编写于 作者: T Takashi Iwai 提交者: Yang Yingliang

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.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 3fae6492
...@@ -111,7 +111,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames) ...@@ -111,7 +111,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)
while (plugin->next) { while (plugin->next) {
if (plugin->dst_frames) if (plugin->dst_frames)
frames = plugin->dst_frames(plugin, frames); frames = plugin->dst_frames(plugin, frames);
if (snd_BUG_ON((snd_pcm_sframes_t)frames <= 0)) if ((snd_pcm_sframes_t)frames <= 0)
return -ENXIO; return -ENXIO;
plugin = plugin->next; plugin = plugin->next;
err = snd_pcm_plugin_alloc(plugin, frames); err = snd_pcm_plugin_alloc(plugin, frames);
...@@ -123,7 +123,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames) ...@@ -123,7 +123,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)
while (plugin->prev) { while (plugin->prev) {
if (plugin->src_frames) if (plugin->src_frames)
frames = plugin->src_frames(plugin, frames); frames = plugin->src_frames(plugin, frames);
if (snd_BUG_ON((snd_pcm_sframes_t)frames <= 0)) if ((snd_pcm_sframes_t)frames <= 0)
return -ENXIO; return -ENXIO;
plugin = plugin->prev; plugin = plugin->prev;
err = snd_pcm_plugin_alloc(plugin, frames); err = snd_pcm_plugin_alloc(plugin, frames);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册