From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: YC Hung <yc.hung@mediatek.com>,
Curtis Malainey <cujomalainey@chromium.org>,
Mark Brown <broonie@kernel.org>, Sasha Levin <sashal@kernel.org>,
pierre-louis.bossart@linux.intel.com, lgirdwood@gmail.com,
peter.ujfalusi@linux.intel.com, yung-chuan.liao@linux.intel.com,
ranjani.sridharan@linux.intel.com, daniel.baluta@nxp.com,
perex@perex.cz, tiwai@suse.com, matthias.bgg@gmail.com,
sound-open-firmware@alsa-project.org,
alsa-devel@alsa-project.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: [PATCH AUTOSEL 6.0 4/7] ASoC: SOF: mediatek: initialize panic_info to zero
Date: Sat, 31 Dec 2022 15:04:59 -0500 [thread overview]
Message-ID: <20221231200502.1748784-4-sashal@kernel.org> (raw)
In-Reply-To: <20221231200502.1748784-1-sashal@kernel.org>
From: YC Hung <yc.hung@mediatek.com>
[ Upstream commit 7bd220f2ba9014b78f0304178103393554b8c4fe ]
Coverity spotted that panic_info is not initialized to zero in
mtk_adsp_dump. Using uninitialized value panic_info.linenum when
calling snd_sof_get_status. Fix this coverity by initializing
panic_info struct as zero.
Signed-off-by: YC Hung <yc.hung@mediatek.com>
Reviewed-by: Curtis Malainey <cujomalainey@chromium.org>
Link: https://lore.kernel.org/r/20221213115617.25086-1-yc.hung@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/sof/mediatek/mtk-adsp-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/sof/mediatek/mtk-adsp-common.c b/sound/soc/sof/mediatek/mtk-adsp-common.c
index 1e0769c668a7..de8dbe27cd0d 100644
--- a/sound/soc/sof/mediatek/mtk-adsp-common.c
+++ b/sound/soc/sof/mediatek/mtk-adsp-common.c
@@ -60,7 +60,7 @@ void mtk_adsp_dump(struct snd_sof_dev *sdev, u32 flags)
{
char *level = (flags & SOF_DBG_DUMP_OPTIONAL) ? KERN_DEBUG : KERN_ERR;
struct sof_ipc_dsp_oops_xtensa xoops;
- struct sof_ipc_panic_info panic_info;
+ struct sof_ipc_panic_info panic_info = {};
u32 stack[MTK_ADSP_STACK_DUMP_SIZE];
u32 status;
--
2.35.1
next prev parent reply other threads:[~2022-12-31 20:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-31 20:04 [PATCH AUTOSEL 6.0 1/7] ASoC: SOF: Revert: "core: unregister clients and machine drivers in .shutdown" Sasha Levin
2022-12-31 20:04 ` [PATCH AUTOSEL 6.0 2/7] 9p/client: fix data race on req->status Sasha Levin
2022-12-31 20:04 ` [PATCH AUTOSEL 6.0 3/7] ASoC: Intel: bytcr_rt5640: Add quirk for the Advantech MICA-071 tablet Sasha Levin
2022-12-31 20:04 ` Sasha Levin [this message]
2022-12-31 20:05 ` [PATCH AUTOSEL 6.0 5/7] drm/amdgpu: Fix size validation for non-exclusive domains (v4) Sasha Levin
2022-12-31 20:05 ` [PATCH AUTOSEL 6.0 6/7] drm/amdkfd: Fix kfd_process_device_init_vm error handling Sasha Levin
2022-12-31 20:05 ` [PATCH AUTOSEL 6.0 7/7] drm/amdkfd: Fix double release compute pasid Sasha Levin
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=20221231200502.1748784-4-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=cujomalainey@chromium.org \
--cc=daniel.baluta@nxp.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=sound-open-firmware@alsa-project.org \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=yc.hung@mediatek.com \
--cc=yung-chuan.liao@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