summaryrefslogtreecommitdiff
path: root/arch/powerpc/lib/code-patching.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2025-02-06 10:46:42 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-27 04:30:16 -0800
commit87c8768a96092ce75cd47fe076db5080db7ac515 (patch)
tree56e633ad5dcea75a7ba2c604fffb916ec250f74f /arch/powerpc/lib/code-patching.c
parent8de1ea6e427ba6e0d9cb7d4af3f06088a77c578a (diff)
downloadlinux-87c8768a96092ce75cd47fe076db5080db7ac515.tar.gz
linux-87c8768a96092ce75cd47fe076db5080db7ac515.tar.bz2
linux-87c8768a96092ce75cd47fe076db5080db7ac515.zip
ASoC: SOF: ipc4-topology: Harden loops for looking up ALH copiers
[ Upstream commit 6fd60136d256b3b948333ebdb3835f41a95ab7ef ] Other, non DAI copier widgets could have the same stream name (sname) as the ALH copier and in that case the copier->data is NULL, no alh_data is attached, which could lead to NULL pointer dereference. We could check for this NULL pointer in sof_ipc4_prepare_copier_module() and avoid the crash, but a similar loop in sof_ipc4_widget_setup_comp_dai() will miscalculate the ALH device count, causing broken audio. The correct fix is to harden the matching logic by making sure that the 1. widget is a DAI widget - so dai = w->private is valid 2. the dai (and thus the copier) is ALH copier Fixes: a150345aa758 ("ASoC: SOF: ipc4-topology: add SoundWire/ALH aggregation support") Reported-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Link: https://github.com/thesofproject/sof/pull/9652 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20250206084642.14988-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
0 files changed, 0 insertions, 0 deletions