linux-stable/sound/soc/sof
Pierre-Louis Bossart 1f810d2b6b
ASoC: SOF: Intel: hda-dai: fix possible stream_tag leak
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>
2023-02-16 16:31:15 +00:00
..
amd ASoC: SOF: amd: Fix for handling spurious interrupts from DSP 2023-02-02 15:37:28 +00:00
imx ASoC: SOF: imx8ulp: add missing of_node_put() in imx8ulp_probe() 2022-08-24 12:21:28 +01:00
intel ASoC: SOF: Intel: hda-dai: fix possible stream_tag leak 2023-02-16 16:31:15 +00:00
mediatek ASoC: SOF: mediatek: initialize panic_info to zero 2022-12-13 18:16:32 +00:00
xtensa
compress.c ASoC: SOF: compress: Add copy function for capture case 2022-08-31 12:12:59 +01:00
control.c
core.c ASoC: SOF: Revert: "core: unregister clients and machine drivers in .shutdown" 2022-12-12 15:44:21 +00:00
debug.c ASoC: SOF: Add FW state to debugfs 2022-12-21 12:11:51 +00:00
iomem-utils.c
ipc.c ASoC: SOF: client: Add sof_client_ipc_set_get_data() 2022-10-31 13:20:20 +00:00
ipc3-control.c
ipc3-dtrace.c ASoC: SOF: ipc3-dtrace: remove use of __func__ in dev_dbg 2022-06-17 10:46:41 +01:00
ipc3-loader.c ASoC: SOF: Introduce container struct for SOF firmware 2022-10-21 13:04:54 +01:00
ipc3-pcm.c ASoC: SOF: Add DAI configuration support for AMD platforms. 2022-11-29 12:56:09 +00:00
ipc3-priv.h
ipc3-topology.c ASoC: SOF: Add DAI configuration support for AMD platforms. 2022-11-29 12:56:09 +00:00
ipc3.c ASoC: SOF: ipc3: Log the tx message before sending it 2022-10-18 19:16:47 +01:00
ipc4-control.c ASoC: SOF: ipc4-topology: Fix error code in sof_ipc4_volume_put() 2022-06-16 09:31:17 +01:00
ipc4-loader.c ASoC: SOF: ipc4-loader: get max pipeline number 2022-11-09 13:44:18 +00:00
ipc4-mtrace.c ASoC: SOF: ipc4-mtrace: prevent underflow in sof_ipc4_priority_mask_dfs_write() 2023-01-20 11:51:47 +00:00
ipc4-pcm.c ASoC: SOF: ipc4: get pipeline instance id from pipe_widget->instance_id 2022-11-09 13:44:20 +00:00
ipc4-priv.h ASoC: SOF: ipc4-loader: get max pipeline number 2022-11-09 13:44:18 +00:00
ipc4-topology.c ASoC: SOF: ipc4-topology: Add widget queue support 2022-11-10 17:50:14 +00:00
ipc4-topology.h ASoC: SOF: ipc4-topology: set domain bit based on dp domain type 2022-07-15 20:11:33 +01:00
ipc4.c ASoC: SOF: Intel/IPC4: Support for external firmware libraries 2022-10-21 20:04:19 +01:00
Kconfig ASoC: SOF: Drop obsolete dependency on COMPILE_TEST 2022-11-28 13:04:35 +00:00
loader.c ASoC: SOF: loader: Remove the query_fw_configuration ops 2022-10-21 13:05:10 +01:00
Makefile ASoC: SOF: IPC4: probes: Implement IPC4 ops for probes client device 2022-10-31 13:20:22 +00:00
nocodec.c ASOC: SOF: use devm_kcalloc() instead of devm_kzalloc() 2022-09-19 17:52:36 +01:00
ops.c
ops.h ASoC: SOF: ops: refine parameters order in function snd_sof_dsp_update8 2023-02-08 11:51:45 +00:00
pcm.c ASoC: SOF: replace dev_vdbg with tracepoints 2022-09-19 15:44:07 +01:00
pm.c ASoC: SOF: pm: Always tear down pipelines before DSP suspend 2022-12-21 12:11:50 +00:00
sof-acpi-dev.c
sof-acpi-dev.h
sof-audio.c ASoC: SOF: sof-audio: prepare_widgets: Check swidget for NULL on sink failure 2023-01-20 14:09:56 +00:00
sof-audio.h ASoC: SOF: Add DAI configuration support for AMD platforms. 2022-11-29 12:56:09 +00:00
sof-client-ipc-flood-test.c ASoC: SOF: sof-client-ipc-flood-test: use pm_runtime_resume_and_get() 2022-05-19 16:44:29 +01:00
sof-client-ipc-msg-injector.c ASoC: SOF: ipc-msg-injector: fix copy in sof_msg_inject_ipc4_dfs_write() 2022-07-14 13:26:37 +01:00
sof-client-probes-ipc3.c ASoC: SOF: probes: Separate IPC3 operations to a separate file 2022-10-31 13:20:18 +00:00
sof-client-probes-ipc4.c ASoC: SOF: IPC4: probes: Implement IPC4 ops for probes client device 2022-10-31 13:20:22 +00:00
sof-client-probes.c ASoC: SOF: probes: Check ops before memory allocation 2022-11-17 13:58:43 +00:00
sof-client-probes.h ASoC: SOF: IPC4: probes: Implement IPC4 ops for probes client device 2022-10-31 13:20:22 +00:00
sof-client.c ASoC: SOF: client: Add sof_client_ipc4_find_module() function 2022-10-31 13:20:21 +00:00
sof-client.h ASoC: SOF: client: Add sof_client_ipc4_find_module() function 2022-10-31 13:20:21 +00:00
sof-of-dev.c
sof-of-dev.h ASoC: SOF: Introduce function sof_of_machine_select 2022-08-23 18:22:29 +01:00
sof-pci-dev.c ASoC: SOF: Add path definition for external firmware libraries 2022-10-21 13:05:03 +01:00
sof-pci-dev.h
sof-priv.h ASoC: SOF: fix compilation issue with readb/writeb helpers 2022-10-31 21:15:19 +00:00
sof-utils.c ASoC: SOF: remove unneeded dev_vdbg 2022-09-19 15:44:06 +01:00
sof-utils.h
stream-ipc.c
topology.c ASoC: SOF: Add DAI configuration support for AMD platforms. 2022-11-29 12:56:09 +00:00
trace.c