From: Takashi Iwai <tiwai@suse.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jaroslav Kysela <perex@perex.cz>,
Danny Tholen <obiwan@mailmij.org>,
Mengdong Lin <mengdong.lin@intel.com>,
David Henningsson <david.henningsson@canonical.com>,
alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] ALSA: hda - using uninitialized data
Date: Thu, 27 Nov 2014 09:38:30 +0100 [thread overview]
Message-ID: <s5hy4qxghrt.wl-tiwai@suse.de> (raw)
In-Reply-To: <20141126223443.GA443@mwanda>
At Thu, 27 Nov 2014 01:34:43 +0300,
Dan Carpenter wrote:
>
> In olden times the snd_hda_param_read() function always set "*start_id"
> but in 2007 we introduced a new return and it causes uninitialized data
> bugs in a couple of the callers: print_codec_info() and
> hdmi_parse_codec().
>
> Fixes: e8a7f136f5ed ('[ALSA] hda-intel - Improve HD-audio codec probing robustness')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> This is from static analysis. Untested.
Applied, thanks.
Takashi
>
> diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
> index b2d5899..2fe86d2 100644
> --- a/sound/pci/hda/hda_codec.c
> +++ b/sound/pci/hda/hda_codec.c
> @@ -346,8 +346,10 @@ int snd_hda_get_sub_nodes(struct hda_codec *codec, hda_nid_t nid,
> unsigned int parm;
>
> parm = snd_hda_param_read(codec, nid, AC_PAR_NODE_COUNT);
> - if (parm == -1)
> + if (parm == -1) {
> + *start_id = 0;
> return 0;
> + }
> *start_id = (parm >> 16) & 0x7fff;
> return (int)(parm & 0x7fff);
> }
>
WARNING: multiple messages have this Message-ID (diff)
From: Takashi Iwai <tiwai@suse.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jaroslav Kysela <perex@perex.cz>,
Danny Tholen <obiwan@mailmij.org>,
Mengdong Lin <mengdong.lin@intel.com>,
David Henningsson <david.henningsson@canonical.com>,
alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] ALSA: hda - using uninitialized data
Date: Thu, 27 Nov 2014 08:38:30 +0000 [thread overview]
Message-ID: <s5hy4qxghrt.wl-tiwai@suse.de> (raw)
In-Reply-To: <20141126223443.GA443@mwanda>
At Thu, 27 Nov 2014 01:34:43 +0300,
Dan Carpenter wrote:
>
> In olden times the snd_hda_param_read() function always set "*start_id"
> but in 2007 we introduced a new return and it causes uninitialized data
> bugs in a couple of the callers: print_codec_info() and
> hdmi_parse_codec().
>
> Fixes: e8a7f136f5ed ('[ALSA] hda-intel - Improve HD-audio codec probing robustness')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> This is from static analysis. Untested.
Applied, thanks.
Takashi
>
> diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
> index b2d5899..2fe86d2 100644
> --- a/sound/pci/hda/hda_codec.c
> +++ b/sound/pci/hda/hda_codec.c
> @@ -346,8 +346,10 @@ int snd_hda_get_sub_nodes(struct hda_codec *codec, hda_nid_t nid,
> unsigned int parm;
>
> parm = snd_hda_param_read(codec, nid, AC_PAR_NODE_COUNT);
> - if (parm = -1)
> + if (parm = -1) {
> + *start_id = 0;
> return 0;
> + }
> *start_id = (parm >> 16) & 0x7fff;
> return (int)(parm & 0x7fff);
> }
>
next prev parent reply other threads:[~2014-11-27 8:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-26 22:34 [patch] ALSA: hda - using uninitialized data Dan Carpenter
2014-11-26 22:34 ` Dan Carpenter
2014-11-27 8:38 ` Takashi Iwai [this message]
2014-11-27 8:38 ` Takashi Iwai
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=s5hy4qxghrt.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=dan.carpenter@oracle.com \
--cc=david.henningsson@canonical.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=mengdong.lin@intel.com \
--cc=obiwan@mailmij.org \
--cc=perex@perex.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.