]> www.infradead.org Git - users/dwmw2/linux.git/commit
ASoC: audio-graph-card: fix use-after-free in graph_dai_link_of_dpcm()
authorWen Yang <wen.yang99@zte.com.cn>
Wed, 10 Jul 2019 07:25:08 +0000 (15:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2019 06:29:45 +0000 (08:29 +0200)
commit7b83af285ad2b2ab9b31cbbdfdb35ed36ce3eb42
tree5ec27469f008c51842d314286022c0aad5862065
parent86827ec32e56268353fb4bb8f4ef1764e9746159
ASoC: audio-graph-card: fix use-after-free in graph_dai_link_of_dpcm()

[ Upstream commit aa2e362cb6b3f5ca88093ada01e1a0ace8a517b2 ]

After calling of_node_put() on the ports, port, and node variables,
they are still being used, which may result in use-after-free.
Fix this issue by calling of_node_put() after the last usage.

Fixes: dd98fbc558a0 ("ASoC: audio-graph-card: cleanup DAI link loop method - step1")
Link: https://lore.kernel.org/r/1562743509-30496-4-git-send-email-wen.yang99@zte.com.cn
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/generic/audio-graph-card.c