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
controller
endpoint
hotplug
msi
pcie
switch
Kconfig -rw-r--r-- 7.8 KB
Makefile -rw-r--r-- 1.2 KB
access.c -rw-r--r-- 15.2 KB
ats.c -rw-r--r-- 11.1 KB
bus.c -rw-r--r-- 10.3 KB
doe.c -rw-r--r-- 14.3 KB
ecam.c -rw-r--r-- 5.6 KB
host-bridge.c -rw-r--r-- 2.4 KB
iov.c -rw-r--r-- 28.2 KB
irq.c -rw-r--r-- 2.4 KB
mmap.c -rw-r--r-- 1.2 KB
of.c -rw-r--r-- 19.0 KB
p2pdma.c -rw-r--r-- 28.7 KB
pci-acpi.c -rw-r--r-- 38.1 KB
pci-bridge-emul.c -rw-r--r-- 18.0 KB
pci-bridge-emul.h -rw-r--r-- 4.1 KB
pci-driver.c -rw-r--r-- 43.1 KB
pci-label.c -rw-r--r-- 5.6 KB
pci-mid.c -rw-r--r-- 1.1 KB
pci-pf-stub.c -rw-r--r-- 1.2 KB
pci-stub.c -rw-r--r-- 2.3 KB
pci-sysfs.c -rw-r--r-- 41.1 KB
pci.c -rw-r--r-- 181.2 KB
pci.h -rw-r--r-- 25.7 KB
probe.c -rw-r--r-- 86.0 KB
proc.c -rw-r--r-- 9.9 KB
quirks.c -rw-r--r-- 213.6 KB
remove.c -rw-r--r-- 3.9 KB
rom.c -rw-r--r-- 5.3 KB
search.c -rw-r--r-- 12.1 KB
setup-bus.c -rw-r--r-- 59.0 KB
setup-irq.c -rw-r--r-- 1.6 KB
setup-res.c -rw-r--r-- 13.3 KB
slot.c -rw-r--r-- 9.7 KB
syscall.c -rw-r--r-- 2.7 KB
vc.c -rw-r--r-- 12.0 KB
vgaarb.c -rw-r--r-- 41.9 KB
vpd.c -rw-r--r-- 14.6 KB
xen-pcifront.c -rw-r--r-- 25.8 KB

back to top