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
hisilicon
sti
tegra
Kconfig -rw-r--r-- 10.1 KB
Makefile -rw-r--r-- 1.9 KB
core.c -rw-r--r-- 31.5 KB
reset-a10sr.c -rw-r--r-- 3.2 KB
reset-ath79.c -rw-r--r-- 3.3 KB
reset-axs10x.c -rw-r--r-- 2.1 KB
reset-bcm6345.c -rw-r--r-- 3.5 KB
reset-berlin.c -rw-r--r-- 2.8 KB
reset-brcmstb-rescal.c -rw-r--r-- 2.8 KB
reset-brcmstb.c -rw-r--r-- 3.3 KB
reset-hsdk.c -rw-r--r-- 3.5 KB
reset-imx7.c -rw-r--r-- 14.0 KB
reset-intel-gw.c -rw-r--r-- 6.4 KB
reset-k210.c -rw-r--r-- 3.0 KB
reset-lantiq.c -rw-r--r-- 5.2 KB
reset-lpc18xx.c -rw-r--r-- 5.7 KB
reset-meson-audio-arb.c -rw-r--r-- 4.9 KB
reset-meson.c -rw-r--r-- 4.0 KB
reset-microchip-sparx5.c -rw-r--r-- 4.5 KB
reset-mpfs.c -rw-r--r-- 3.8 KB
reset-npcm.c -rw-r--r-- 11.9 KB
reset-oxnas.c -rw-r--r-- 2.7 KB
reset-pistachio.c -rw-r--r-- 3.3 KB
reset-qcom-aoss.c -rw-r--r-- 3.5 KB
reset-qcom-pdc.c -rw-r--r-- 4.4 KB
reset-raspberrypi.c -rw-r--r-- 3.1 KB
reset-rzg2l-usbphy-ctrl.c -rw-r--r-- 4.7 KB
reset-scmi.c -rw-r--r-- 3.6 KB
reset-simple.c -rw-r--r-- 5.6 KB
reset-socfpga.c -rw-r--r-- 2.8 KB
reset-starfive-jh7100.c -rw-r--r-- 4.7 KB
reset-sunplus.c -rw-r--r-- 3.7 KB
reset-sunxi.c -rw-r--r-- 1.9 KB
reset-ti-sci.c -rw-r--r-- 7.8 KB
reset-ti-syscon.c -rw-r--r-- 6.8 KB
reset-tn48m.c -rw-r--r-- 2.9 KB
reset-tps380x.c -rw-r--r-- 3.3 KB
reset-uniphier-glue.c -rw-r--r-- 4.8 KB
reset-uniphier.c -rw-r--r-- 15.0 KB
reset-zynq.c -rw-r--r-- 3.2 KB
reset-zynqmp.c -rw-r--r-- 3.5 KB

back to top