Message ID | 20221213115617.25086-1-yc.hung@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ASoC: SOF: mediatek: initialize panic_info to zero | expand |
On Tue, Dec 13, 2022 at 3:56 AM YC Hung <yc.hung@mediatek.com> wrote: > > 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>
On Tue, 13 Dec 2022 19:56:17 +0800, YC Hung wrote: > 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. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: SOF: mediatek: initialize panic_info to zero commit: 7bd220f2ba9014b78f0304178103393554b8c4fe All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
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;
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> --- sound/soc/sof/mediatek/mtk-adsp-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)