[PATCH openEuler-1.0-LTS] ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe

From: Miaoqian Lin <linmq006@gmail.com> stable inclusion from stable-v4.19.247 commit 30d110ca703ce60162ec337aa564a3e4da30715f category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBP75W CVE: CVE-2022-49482 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=... -------------------------------- [ Upstream commit 2be84f73785fa9ed6443e3c5b158730266f1c2ee ] of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Fixes: 08641c7c74dd ("ASoC: mxs: add device tree support for mxs-saif") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Link: https://lore.kernel.org/r/20220511133725.39039-1-linmq006@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Zizhi Wo <wozizhi@huawei.com> --- sound/soc/mxs/mxs-saif.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index 156aa7c00787..f5f7f49ab3f1 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -777,6 +777,7 @@ static int mxs_saif_probe(struct platform_device *pdev) saif->master_id = saif->id; } else { ret = of_alias_get_id(master, "saif"); + of_node_put(master); if (ret < 0) return ret; else -- 2.39.2

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/15628 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/YVX... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/15628 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/YVX...
participants (2)
-
patchwork bot
-
Zizhi Wo