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] [day] [month] [year] [list]
Date:	Mon, 19 Jul 2010 18:00:29 +0200
From:	Takashi Iwai <tiwai@...e.de>
To:	Kulikov Vasiliy <segooon@...il.com>
Cc:	kernel-janitors@...r.kernel.org, Jaroslav Kysela <perex@...ex.cz>,
	Alexey Dobriyan <adobriyan@...il.com>,
	Dan Carpenter <error27@...il.com>,
	Andy Shevchenko <ext-andriy.shevchenko@...ia.com>,
	Roel Kluin <roel.kluin@...il.com>,
	linux-kernel@...r.kernel.org, alsa-devel@...a-project.org
Subject: Re: [PATCH 12/15] pci: riptide: check kzalloc() result

At Fri, 16 Jul 2010 20:15:59 +0400,
Kulikov Vasiliy wrote:
> 
> If kzalloc() fails exit with -ENOMEM.
> 
> Signed-off-by: Kulikov Vasiliy <segooon@...il.com>

Thanks, applied now.


Takashi

> ---
>  sound/pci/riptide/riptide.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c
> index 59d7996..f64fb7d 100644
> --- a/sound/pci/riptide/riptide.c
> +++ b/sound/pci/riptide/riptide.c
> @@ -1615,7 +1615,10 @@ static int snd_riptide_playback_open(struct snd_pcm_substream *substream)
>  
>  	chip->playback_substream[sub_num] = substream;
>  	runtime->hw = snd_riptide_playback;
> +
>  	data = kzalloc(sizeof(struct pcmhw), GFP_KERNEL);
> +	if (data == NULL)
> +		return -ENOMEM;
>  	data->paths = lbus_play_paths[sub_num];
>  	data->id = play_ids[sub_num];
>  	data->source = play_sources[sub_num];
> @@ -1635,7 +1638,10 @@ static int snd_riptide_capture_open(struct snd_pcm_substream *substream)
>  
>  	chip->capture_substream = substream;
>  	runtime->hw = snd_riptide_capture;
> +
>  	data = kzalloc(sizeof(struct pcmhw), GFP_KERNEL);
> +	if (data == NULL)
> +		return -ENOMEM;
>  	data->paths = lbus_rec_path;
>  	data->id = PADC;
>  	data->source = ACLNK2PADC;
> -- 
> 1.7.0.4
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ