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]
Message-ID: <s5hoc21enjl.wl%tiwai@suse.de>
Date:	Mon, 13 Jun 2011 17:52:46 +0200
From:	Takashi Iwai <tiwai@...e.de>
To:	Greg Thelen <gthelen@...gle.com>
Cc:	Jaroslav Kysela <perex@...ex.cz>, alsa-devel@...a-project.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hda: check make_exec_verb() return value

At Mon, 13 Jun 2011 07:45:45 -0700,
Greg Thelen wrote:
> 
> If given a -1 cmd parameter then make_exec_verb() returns -1 without
> setting the res output value.
> 
> Prior to this change snd_hda_codec_read() assumed that make_exec_verb()
> unconditionally set res regardless of the cmd value.
> 
> This change explicitly checks the make_exec_verb() return value before
> consuming the potentially unset res value.
> 
> Signed-off-by: Greg Thelen <gthelen@...gle.com>

Applied now.  Thanks.


Takashi


> ---
>  sound/pci/hda/hda_codec.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
> index 45b4a8d..f06dd5f 100644
> --- a/sound/pci/hda/hda_codec.c
> +++ b/sound/pci/hda/hda_codec.c
> @@ -243,7 +243,8 @@ unsigned int snd_hda_codec_read(struct hda_codec *codec, hda_nid_t nid,
>  {
>  	unsigned cmd = make_codec_cmd(codec, nid, direct, verb, parm);
>  	unsigned int res;
> -	codec_exec_verb(codec, cmd, &res);
> +	if (codec_exec_verb(codec, cmd, &res))
> +		return -1;
>  	return res;
>  }
>  EXPORT_SYMBOL_HDA(snd_hda_codec_read);
> -- 
> 1.7.3.1
> 
--
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