linux_dsm_epyc7002/sound/soc
Curtis Malainey 09ac6a817b
ASoC: soc-core: fix init platform memory handling
snd_soc_init_platform initializes pointers to snd_soc_dai_link which is
statically allocated and it does this by devm_kzalloc. In the event of
an EPROBE_DEFER the memory will be freed and the pointers are left
dangling. snd_soc_init_platform sees the dangling pointers and assumes
they are pointing to initialized memory and does not reallocate them on
the second probe attempt which results in a use after free bug since
devm has freed the memory from the first probe attempt.

Since the intention for snd_soc_dai_link->platform is that it can be set
statically by the machine driver we need to respect the pointer in the
event we did not set it but still catch dangling pointers. The solution
is to add a flag to track whether the pointer was dynamically allocated
or not.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-14 22:48:16 +00:00
..
adi
amd ASoC: use dma_ops of parent device for acp_audio_dma 2018-12-06 12:55:28 +00:00
atmel ASoC: atmel: add SND_SOC_I2C_AND_SPI dependency 2018-09-27 23:22:40 +01:00
au1x treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
bcm ASoC: bcm: use devm_snd_soc_register_component() 2018-09-10 15:13:12 +01:00
cirrus ASoC: cirrus: i2s: IRQ-based stream watchdog 2018-05-11 11:27:33 +09:00
codecs ASoC: tlv320aic32x4: Kernel OOPS while entering DAPM standby mode 2019-01-07 17:02:44 +00:00
dwc Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/es7134', 'asoc/topic/es8316', 'asoc/topic/es8328' and 'asoc/topic/fsl' into asoc-next 2018-03-28 10:29:36 +08:00
fsl ASoC: fsl: Fix SND_SOC_EUKREA_TLV320 build error on i.MX8M 2018-12-13 11:01:51 +00:00
generic ASoC: simple-card: tidyup prefix for snd_soc_codec_conf 2018-12-14 11:48:57 +00:00
hisilicon ASoC: hisilicon: fix fall-through annotations 2018-09-17 10:30:23 -07:00
img treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
intel ASoC: Intel: Boards: move the codec PLL configuration to _init 2019-01-09 19:26:47 +00:00
jz4740
kirkwood ASoC: Remove depends on HAS_DMA in case of platform dependency 2018-04-18 11:17:09 +01:00
mediatek ASoC: Convert a few more users to using %pOFn instead of device_node.name 2018-11-16 19:07:35 -08:00
meson ASoC: meson: fix do_div warning in spdifin 2018-12-13 16:20:28 +00:00
mxs
nuc900 ASoC: nuc900: use devm_snd_soc_register_component() 2018-09-10 15:14:14 +01:00
pxa ASoC: pxa: remove raumfeld machine driver 2018-12-03 15:28:29 +00:00
qcom ASoC: qdsp6: q6asm-dai: Fix a small memory leak 2019-01-03 16:32:56 +00:00
rockchip ASoC: rockchip: add missing slave_config setting for I2S 2018-11-13 10:06:23 -08:00
samsung ASoC: add for_each_card_prelinks() macro 2018-09-20 10:18:34 -07:00
sh ASoC: dma-sh7760: cleanup a debug printk 2019-01-03 16:32:48 +00:00
sirf ASoC: sirf: Fix potential NULL pointer dereference 2018-07-30 12:02:30 +01:00
spear
sti ASoC: sti: Use snd_pcm_stop_xrun() helper 2018-07-04 15:41:35 +01:00
stm ASoC: Convert a few more users to using %pOFn instead of device_node.name 2018-11-16 19:07:35 -08:00
sunxi Merge branch 'for-4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-4.21 intel dep 2018-12-13 14:36:46 +00:00
tegra ASoC: tegra_sgtl5000: fix device_node refcounting 2018-10-17 19:51:22 +01:00
ti ASoC: ti: davinci-mcasp: Move context save/restore to runtime_pm callbacks 2019-01-04 15:18:42 +00:00
txx9 ASoC: txx9: use devm_snd_soc_register_component() 2018-09-10 15:14:47 +01:00
uniphier ASoC: uniphier: change functions to static 2018-07-30 12:02:32 +01:00
ux500
xilinx ASoC: xlnx: change license header format style 2019-01-03 16:32:51 +00:00
xtensa ASoC: xtfpga-i2s: replace platform to component 2018-02-12 11:45:32 +00:00
zte ASoC: zte: Fix incorrect PCM format bit usages 2018-07-26 15:48:19 +01:00
Kconfig ASoC: ti: Merge davinci and omap directories 2018-12-18 12:22:43 +00:00
Makefile ASoC: ti: Merge davinci and omap directories 2018-12-18 12:22:43 +00:00
soc-ac97.c ASoC: ac97: convert to SPDX identifiers 2018-07-02 10:56:09 +01:00
soc-acpi.c ASoC: acpi: fix: continue searching when machine is ignored 2018-11-20 16:53:17 +00:00
soc-compress.c ASoC: add for_each_dpcm_be() macro 2018-09-20 10:31:20 -07:00
soc-core.c ASoC: soc-core: fix init platform memory handling 2019-01-14 22:48:16 +00:00
soc-dapm.c ASoC: dapm: Add support for hw_free on CODEC to CODEC links 2018-10-19 13:08:27 +01:00
soc-devres.c ASoC: soc-devres.c: convert to SPDX identifiers 2018-07-02 10:55:22 +01:00
soc-generic-dmaengine-pcm.c DMAengine updates for v4.19-rc1 2018-08-18 15:55:59 -07:00
soc-io.c ASoC: soc-io.c: convert to SPDX identifiers 2018-07-02 10:53:55 +01:00
soc-jack.c ASoC: soc-jack.c: convert to SPDX identifiers 2018-07-02 10:55:12 +01:00
soc-ops.c ASoC: Fix UBSAN warning at snd_soc_get/put_volsw_sx() 2018-09-11 11:58:52 +01:00
soc-pcm.c ASoC: add for_each_dpcm_be() macro 2018-09-20 10:31:20 -07:00
soc-topology.c ASoC: topology: Use the standard fall-through annotations 2018-10-05 12:38:22 +01:00
soc-utils.c ASoC: soc-utils: Rename dummy_dma_ops to snd_dummy_dma_ops 2018-09-27 23:15:46 +01:00