linux/sound/soc/sof
Pierre-Louis Bossart 5660a6ffa7 ASoC: SOF: Intel: hda-dai: fix possible stream_tag leak
commit 1f810d2b6b upstream.

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: b0cd60f3e9 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:50:42 +01:00
..
imx ASoC: SOF: imx8: Fix randbuild error 2020-06-24 17:50:08 +02:00
intel ASoC: SOF: Intel: hda-dai: fix possible stream_tag leak 2023-02-22 12:50:42 +01:00
xtensa sound fixes for 5.2-rc5 2019-06-14 05:37:06 -10:00
control.c ASoC: SOF: control: return true when kcontrol values change 2019-10-18 18:09:22 +01:00
core.c ASoC: SOF: core: fix error return code in sof_probe_continue() 2020-06-24 17:50:25 +02:00
debug.c ASoC: SOF: debug: Fix a potential issue on string buffer termination 2021-03-04 10:26:24 +01:00
ipc.c ASoC: SOF: ipc: check ipc return value before data copy 2020-10-01 13:17:37 +02:00
Kconfig ASoC: SOF: imx: Add i.MX8 HW support 2019-08-22 18:28:32 +01:00
loader.c ASoC: SOF: Introduce state machine for FW boot 2020-02-11 04:35:27 -08:00
Makefile ASoC: SOF: imx: Add i.MX8 HW support 2019-08-22 18:28:32 +01:00
nocodec.c ASoC: SOF: nocodec: add missing .owner field 2020-08-19 08:16:08 +02:00
ops.c ASoC: SOF: Fix a compile warning with CONFIG_PCI=n 2019-05-07 11:23:57 +09:00
ops.h ASoC: SOF: Introduce snd_sof_dsp_get_window_offset 2019-08-09 13:26:02 +01:00
pcm.c ASoC: SOF: pcm: harden PCM STOP sequence 2019-10-01 18:31:25 +01:00
pm.c ASoC: SOF: Do nothing when DSP PM callbacks are not set 2020-06-24 17:50:14 +02:00
sof-acpi-dev.c ASoC: SOF: add runtime idle callback 2019-07-06 12:23:24 +01:00
sof-of-dev.c ASoC: SOF: Add OF DSP device support 2019-08-22 18:28:20 +01:00
sof-pci-dev.c ASoC: SOF: Intel: add PCI ID for CometLake-S 2020-07-16 08:16:33 +02:00
sof-priv.h ASoC: SOF: Introduce state machine for FW boot 2020-02-11 04:35:27 -08:00
topology.c ASoC: SOF: topology: set trigger order for FE DAI link 2019-12-31 16:44:44 +01:00
trace.c ASoC: SOF: trace: fix unconditional free in trace release 2020-04-29 16:33:05 +02:00
utils.c ASoC: SOF: Add utils 2019-04-28 02:49:47 +09:00