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-- 4.7 KB
Makefile -rw-r--r-- 716 bytes
README.dino -rw-r--r-- 1.0 KB
asp.c -rw-r--r-- 3.3 KB
ccio-dma.c -rw-r--r-- 46.5 KB
dino.c -rw-r--r-- 31.5 KB
eisa.c -rw-r--r-- 11.5 KB
eisa_eeprom.c -rw-r--r-- 2.0 KB
eisa_enumerator.c -rw-r--r-- 11.2 KB
gsc.c -rw-r--r-- 6.2 KB
gsc.h -rw-r--r-- 1.5 KB
hppb.c -rw-r--r-- 2.5 KB
iommu-helpers.h -rw-r--r-- 4.8 KB
iommu.h -rw-r--r-- 1.4 KB
iosapic.c -rw-r--r-- 28.1 KB
iosapic_private.h -rw-r--r-- 5.0 KB
lasi.c -rw-r--r-- 6.0 KB
lba_pci.c -rw-r--r-- 50.6 KB
led.c -rw-r--r-- 19.8 KB
pdc_stable.c -rw-r--r-- 29.8 KB
power.c -rw-r--r-- 7.3 KB
sba_iommu.c -rw-r--r-- 57.4 KB
superio.c -rw-r--r-- 13.6 KB
wax.c -rw-r--r-- 3.0 KB

README.dino

back to top