https://github.com/torvalds/linux
Revision 1f810d2b6b2fbdc5279644d8b2c140b1f7c9d43d authored by Pierre-Louis Bossart on 16 February 2023, 16:23:40 UTC, committed by Mark Brown on 16 February 2023, 16:31:15 UTC
The HDaudio stream allocation is done first, and in a second step the
LOSIDV parameter is programmed for the multi-link used by a codec.

This leads to a possible stream_tag leak, e.g. if a DisplayAudio link
is not used. This would happen when a non-Intel graphics card is used
and userspace unconditionally uses the Intel Display Audio PCMs without
checking if they are connected to a receiver with jack controls.

We should first check that there is a valid multi-link entry to
configure before allocating a stream_tag. This change aligns the
dma_assign and dma_cleanup phases.

Complements: b0cd60f3e9f5 ("ALSA/ASoC: hda: clarify bus_get_link() and bus_link_get() helpers")
Link: https://github.com/thesofproject/linux/issues/4151
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230216162340.19480-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 5afc7ee
History
Tip revision: 1f810d2b6b2fbdc5279644d8b2c140b1f7c9d43d authored by Pierre-Louis Bossart on 16 February 2023, 16:23:40 UTC
ASoC: SOF: Intel: hda-dai: fix possible stream_tag leak
Tip revision: 1f810d2
File Mode Size
fsl-mc
mhi
Kconfig -rw-r--r-- 8.2 KB
Makefile -rw-r--r-- 1.3 KB
arm-cci.c -rw-r--r-- 15.5 KB
arm-integrator-lm.c -rw-r--r-- 3.1 KB
brcmstb_gisb.c -rw-r--r-- 13.3 KB
bt1-apb.c -rw-r--r-- 9.2 KB
bt1-axi.c -rw-r--r-- 7.1 KB
da8xx-mstpri.c -rw-r--r-- 5.9 KB
hisi_lpc.c -rw-r--r-- 18.0 KB
imx-weim.c -rw-r--r-- 9.6 KB
intel-ixp4xx-eb.c -rw-r--r-- 11.1 KB
mips_cdmm.c -rw-r--r-- 19.4 KB
moxtet.c -rw-r--r-- 18.6 KB
mvebu-mbus.c -rw-r--r-- 35.9 KB
omap-ocp2scp.c -rw-r--r-- 3.1 KB
omap_l3_noc.c -rw-r--r-- 10.2 KB
omap_l3_noc.h -rw-r--r-- 11.9 KB
omap_l3_smx.c -rw-r--r-- 7.1 KB
omap_l3_smx.h -rw-r--r-- 7.3 KB
qcom-ebi2.c -rw-r--r-- 10.5 KB
qcom-ssc-block-bus.c -rw-r--r-- 10.4 KB
simple-pm-bus.c -rw-r--r-- 2.7 KB
sun50i-de2.c -rw-r--r-- 1.1 KB
sunxi-rsb.c -rw-r--r-- 20.8 KB
tegra-aconnect.c -rw-r--r-- 2.9 KB
tegra-gmi.c -rw-r--r-- 8.1 KB
ti-pwmss.c -rw-r--r-- 1.2 KB
ti-sysc.c -rw-r--r-- 86.5 KB
ts-nbus.c -rw-r--r-- 8.8 KB
uniphier-system-bus.c -rw-r--r-- 7.3 KB
vexpress-config.c -rw-r--r-- 10.0 KB

back to top