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
Kconfig -rw-r--r-- 9.0 KB
Makefile -rw-r--r-- 2.2 KB
altera-cvp.c -rw-r--r-- 18.9 KB
altera-fpga2sdram.c -rw-r--r-- 4.9 KB
altera-freeze-bridge.c -rw-r--r-- 6.8 KB
altera-hps2fpga.c -rw-r--r-- 5.7 KB
altera-pr-ip-core-plat.c -rw-r--r-- 1.3 KB
altera-pr-ip-core.c -rw-r--r-- 4.7 KB
altera-ps-spi.c -rw-r--r-- 8.2 KB
dfl-afu-dma-region.c -rw-r--r-- 10.3 KB
dfl-afu-error.c -rw-r--r-- 6.2 KB
dfl-afu-main.c -rw-r--r-- 23.2 KB
dfl-afu-region.c -rw-r--r-- 4.1 KB
dfl-afu.h -rw-r--r-- 3.2 KB
dfl-fme-br.c -rw-r--r-- 2.5 KB
dfl-fme-error.c -rw-r--r-- 9.6 KB
dfl-fme-main.c -rw-r--r-- 18.9 KB
dfl-fme-mgr.c -rw-r--r-- 8.9 KB
dfl-fme-perf.c -rw-r--r-- 29.5 KB
dfl-fme-pr.c -rw-r--r-- 11.4 KB
dfl-fme-pr.h -rw-r--r-- 2.0 KB
dfl-fme-region.c -rw-r--r-- 2.1 KB
dfl-fme.h -rw-r--r-- 1.3 KB
dfl-n3000-nios.c -rw-r--r-- 17.7 KB
dfl-pci.c -rw-r--r-- 12.0 KB
dfl.c -rw-r--r-- 46.4 KB
dfl.h -rw-r--r-- 15.6 KB
fpga-bridge.c -rw-r--r-- 10.2 KB
fpga-mgr.c -rw-r--r-- 25.2 KB
fpga-region.c -rw-r--r-- 7.5 KB
ice40-spi.c -rw-r--r-- 5.3 KB
intel-m10-bmc-sec-update.c -rw-r--r-- 15.7 KB
lattice-sysconfig-spi.c -rw-r--r-- 3.7 KB
lattice-sysconfig.c -rw-r--r-- 8.7 KB
lattice-sysconfig.h -rw-r--r-- 1.4 KB
machxo2-spi.c -rw-r--r-- 9.3 KB
microchip-spi.c -rw-r--r-- 9.6 KB
of-fpga-region.c -rw-r--r-- 12.1 KB
socfpga-a10.c -rw-r--r-- 15.2 KB
socfpga.c -rw-r--r-- 16.8 KB
stratix10-soc.c -rw-r--r-- 11.7 KB
ts73xx-fpga.c -rw-r--r-- 3.4 KB
versal-fpga.c -rw-r--r-- 2.0 KB
xilinx-pr-decoupler.c -rw-r--r-- 4.4 KB
xilinx-spi.c -rw-r--r-- 6.4 KB
zynq-fpga.c -rw-r--r-- 17.1 KB
zynqmp-fpga.c -rw-r--r-- 2.7 KB

back to top