From: Takashi Iwai <tiwai@suse.de>
To: "Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>
Cc: "Kangjie Lu" <kjlu@umn.edu>, <alsa-devel@alsa-project.org>,
"Mark Brown" <broonie@kernel.org>,
"Liam Girdwood" <liam.r.girdwood@linux.intel.com>,
"Jie Yang" <yang.jie@linux.intel.com>,
"Jaroslav Kysela" <perex@perex.cz>,
"Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
<pakki001@umn.edu>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sound: atom: fix a missing check of snd_pcm_lib_malloc_pages
Date: Tue, 01 Jan 2019 09:34:14 +0100 [thread overview]
Message-ID: <s5h36qckc8p.wl-tiwai@suse.de> (raw)
In-Reply-To: <a684ebcb-7b7a-d5b5-8770-f87db0c5a480@linux.intel.com>
On Wed, 26 Dec 2018 18:57:47 +0100,
Pierre-Louis Bossart wrote:
>
>
> On 12/25/18 8:29 PM, Kangjie Lu wrote:
> > snd_pcm_lib_malloc_pages() may fail, so let's check its status and
> > return its error code upstream.
>
> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This fixes a potential kernel Oops. Mark, please put Cc to stable
when applying.
thanks,
Takashi
>
>
> >
> > Signed-off-by: Kangjie Lu <kjlu@umn.edu>
> > ---
> > sound/soc/intel/atom/sst-mfld-platform-pcm.c | 8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
> > index afc559866095..91a2436ce952 100644
> > --- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
> > +++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
> > @@ -399,7 +399,13 @@ static int sst_media_hw_params(struct snd_pcm_substream *substream,
> > struct snd_pcm_hw_params *params,
> > struct snd_soc_dai *dai)
> > {
> > - snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params));
> > + int ret;
> > +
> > + ret =
> > + snd_pcm_lib_malloc_pages(substream,
> > + params_buffer_bytes(params));
> > + if (ret)
> > + return ret;
> > memset(substream->runtime->dma_area, 0, params_buffer_bytes(params));
> > return 0;
> > }
>
next prev parent reply other threads:[~2019-01-01 8:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-26 2:29 Kangjie Lu
2018-12-26 17:57 ` Pierre-Louis Bossart
2019-01-01 8:34 ` Takashi Iwai [this message]
2019-01-07 18:10 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5h36qckc8p.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kjlu@umn.edu \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pakki001@umn.edu \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=yang.jie@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®