lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a684ebcb-7b7a-d5b5-8770-f87db0c5a480@linux.intel.com>
Date:   Wed, 26 Dec 2018 11:57:47 -0600
From:   Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To:     Kangjie Lu <kjlu@....edu>
Cc:     pakki001@....edu, Liam Girdwood <liam.r.girdwood@...ux.intel.com>,
        Jie Yang <yang.jie@...ux.intel.com>,
        Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
        alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sound: atom: fix a missing check of
 snd_pcm_lib_malloc_pages


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@...ux.intel.com>


>
> Signed-off-by: Kangjie Lu <kjlu@....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;
>   }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ