From: Cezary Rojewski <cezary.rojewski@intel.com>
To: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
Cc: alsa-devel@alsa-project.org, "Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
"Jie Yang" <yang.jie@linux.intel.com>,
linux-kernel@vger.kernel.org,
"Amadeusz Sławiński" <amadeuszx.slawinski@intel.com>
Subject: Re: [PATCH 2/6] ASoC: Intel: Fix use of potentially uninitialized variable
Date: Tue, 27 Aug 2019 21:18:37 +0200 [thread overview]
Message-ID: <a1ce2e69-d93a-93e8-8bbf-07c27e52124f@intel.com> (raw)
In-Reply-To: <20190827141712.21015-3-amadeuszx.slawinski@linux.intel.com>
On 2019-08-27 16:17, Amadeusz Sławiński wrote:
> From: Amadeusz Sławiński <amadeuszx.slawinski@intel.com>
>
> If ipc->ops.reply_msg_match is NULL, we may end up using uninitialized
> mask value.
>
> reported by smatch:
> sound/soc/intel/common/sst-ipc.c:266 sst_ipc_reply_find_msg() error: uninitialized symbol 'mask'.
>
> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@intel.com>
> ---
> sound/soc/intel/common/sst-ipc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/sound/soc/intel/common/sst-ipc.c b/sound/soc/intel/common/sst-ipc.c
> index 1186a03a88d6..6068bb697e22 100644
> --- a/sound/soc/intel/common/sst-ipc.c
> +++ b/sound/soc/intel/common/sst-ipc.c
> @@ -223,6 +223,8 @@ struct ipc_message *sst_ipc_reply_find_msg(struct sst_generic_ipc *ipc,
>
> if (ipc->ops.reply_msg_match != NULL)
> header = ipc->ops.reply_msg_match(header, &mask);
> + else
> + mask = (u64)-1;
Please see linux/limits.h and check if this can't be replaced by an
equivalent found there.
>
> if (list_empty(&ipc->rx_list)) {
> dev_err(ipc->dev, "error: rx list empty but received 0x%llx\n",
>
next prev parent reply other threads:[~2019-08-27 19:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 14:17 [PATCH 0/6] Small fixes Amadeusz Sławiński
2019-08-27 14:17 ` [PATCH 1/6] ASoC: Intel: Skylake: Use correct function to access iomem space Amadeusz Sławiński
2019-08-27 14:17 ` [PATCH 2/6] ASoC: Intel: Fix use of potentially uninitialized variable Amadeusz Sławiński
2019-08-27 19:18 ` Cezary Rojewski [this message]
2019-08-27 14:17 ` [PATCH 3/6] ASoC: dapm: Expose snd_soc_dapm_new_control_unlocked properly Amadeusz Sławiński
2019-08-27 14:17 ` [PATCH 4/6] ASoC: Intel: Skylake: Print module type instead of id Amadeusz Sławiński
2019-08-27 14:17 ` [PATCH 5/6] ASoC: Intel: Skylake: Release topology when we are done with it Amadeusz Sławiński
2019-08-27 14:17 ` [PATCH 6/6] ASoC: Intel: NHLT: Fix debug print format Amadeusz Sławiński
2019-08-27 14:58 ` [alsa-devel] [PATCH 0/6] Small fixes Pierre-Louis Bossart
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=a1ce2e69-d93a-93e8-8bbf-07c27e52124f@intel.com \
--to=cezary.rojewski@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=amadeuszx.slawinski@intel.com \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.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