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
chips
devices
hyperbus
lpddr
maps
nand
parsers
spi-nor
tests
ubi
Kconfig -rw-r--r-- 7.7 KB
Makefile -rw-r--r-- 964 bytes
ftl.c -rw-r--r-- 30.5 KB
inftlcore.c -rw-r--r-- 23.7 KB
inftlmount.c -rw-r--r-- 21.5 KB
mtd_blkdevs.c -rw-r--r-- 12.2 KB
mtdblock.c -rw-r--r-- 8.7 KB
mtdblock_ro.c -rw-r--r-- 1.8 KB
mtdchar.c -rw-r--r-- 31.0 KB
mtdconcat.c -rw-r--r-- 22.0 KB
mtdcore.c -rw-r--r-- 64.3 KB
mtdcore.h -rw-r--r-- 934 bytes
mtdoops.c -rw-r--r-- 11.2 KB
mtdpart.c -rw-r--r-- 19.0 KB
mtdpstore.c -rw-r--r-- 14.5 KB
mtdsuper.c -rw-r--r-- 4.9 KB
mtdswap.c -rw-r--r-- 33.0 KB
nftlcore.c -rw-r--r-- 22.1 KB
nftlmount.c -rw-r--r-- 25.1 KB
rfd_ftl.c -rw-r--r-- 17.9 KB
sm_ftl.c -rw-r--r-- 30.0 KB
sm_ftl.h -rw-r--r-- 2.2 KB
ssfdc.c -rw-r--r-- 11.2 KB

back to top