linux/sound/soc
Ross Zwisler 0efa3334d6
ASoC: Intel: avoid Oops if DMA setup fails
Currently in sst_dsp_new() if we get an error return from sst_dma_new()
we just print an error message and then still complete the function
successfully.  This means that we are trying to run without sst->dma
properly set up, which will result in NULL pointer dereference when
sst->dma is later used.  This was happening for me in
sst_dsp_dma_get_channel():

        struct sst_dma *dma = dsp->dma;
	...
        dma->ch = dma_request_channel(mask, dma_chan_filter, dsp);

This resulted in:

   BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
   IP: sst_dsp_dma_get_channel+0x4f/0x125 [snd_soc_sst_firmware]

Fix this by adding proper error handling for the case where we fail to
set up DMA.

This change only affects Haswell and Broadwell systems.  Baytrail
systems explicilty opt-out of DMA via sst->pdata->resindex_dma_base
being set to -1.

Signed-off-by: Ross Zwisler <zwisler@google.com>
Cc: stable@vger.kernel.org
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-03 14:55:18 +09:00
..
adi ASoC: axi-i2s: let both capture and playback be optional 2019-03-11 17:17:38 +00:00
amd ASoC: amd: acp3x: Make acp3x_dai_i2s_ops static 2019-05-02 10:46:03 +09:00
atmel ASoC: atmel: tse850: Make some functions static 2019-05-02 10:46:05 +09: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: hdmi-codec: stream is already locked in hw_params 2019-05-03 14:54:43 +09:00
dwc ASoC: dwc: Drop superfluous PCM preallocation error checks 2019-02-06 18:28:59 +01:00
fsl ASoC: fsl_esai: Fix missing break in switch statement 2019-05-02 11:11:48 +09:00
generic ASoC: simple-card: Read pin switches conf from devicetree 2019-04-26 10:50:51 +01: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: avoid Oops if DMA setup fails 2019-05-03 14:55:18 +09:00
jz4740 ASoC: jz4740: Depend on MIPS instead of MACH_JZ4740 2019-03-20 17:05:40 +00:00
kirkwood ASoC: Remove depends on HAS_DMA in case of platform dependency 2018-04-18 11:17:09 +01:00
mediatek ASoC: Mediatek: MT8183: add I2S2 control path from UL2 and UL3 2019-05-02 10:46:18 +09:00
meson ASoC: meson: axg-tdmout: add g12a support 2019-04-05 09:27:00 +07:00
mxs
nuc900 ASoC: nuc900: use devm_snd_soc_register_component() 2018-09-10 15:14:14 +01:00
pxa ASoC: eliminate left-over from Raumfeld machine driver removal 2019-01-07 16:58:19 +00:00
qcom ASoC: qcom: add i2c dependency for SND_SOC_SDM845 2019-03-11 16:31:49 +00:00
rockchip ASoC: rockchip: pdm: Mark RXFIFO_DATA as volatile and precious 2019-04-04 15:13:50 +07:00
samsung ASoC: samsung: tobermory: Convert to SPDX License Identifier 2019-04-19 16:59:55 +01:00
sh ASoC: rsnd: fixup 6ch settings to 8ch 2019-04-25 19:41:09 +01:00
sirf ASoC: sirf: Fix potential NULL pointer dereference 2018-07-30 12:02:30 +01:00
sof ASoC: SOF: remove redundant null checks of dai 2019-05-03 14:54:15 +09:00
spear
sprd ASoC: sprd: Fix to use list_for_each_entry_safe() when delete items 2019-05-02 11:01:53 +09:00
sti ASoC: sti: Use snd_pcm_stop_xrun() helper 2018-07-04 15:41:35 +01:00
stm ASoC: stm32: sai: simplify dai driver initialisation 2019-04-26 11:02:16 +01:00
sunxi ASoC: sunxi: sun50i-codec-analog: Rename hpvcc regulator supply to cpvdd 2019-02-19 15:36:02 +00:00
tegra ASoC: tegra_sgtl5000: fix device_node refcounting 2018-10-17 19:51:22 +01:00
ti ASoC: ti: fix davinci_mcasp_probe dependencies 2019-03-11 16:34:05 +00:00
txx9 ASoC: txx9: Drop superfluous PCM preallocation error checks 2019-02-06 18:29:33 +01:00
uniphier ASoC: uniphier: Drop superfluous PCM preallocation error checks 2019-02-06 18:29:39 +01:00
ux500
xilinx ASoC: xlnx: fix up for snd_pcm_lib_preallocate_pages_for_all() API change 2019-02-08 14:23:54 +01:00
xtensa ASoC: xtensa: Drop superfluous PCM preallocation error checks 2019-02-06 18:29:44 +01:00
zte ASoC: zte: Fix incorrect PCM format bit usages 2018-07-26 15:48:19 +01:00
Kconfig ASoC: SOF: Add Build support for SOF core and Intel drivers 2019-04-28 02:51:46 +09:00
Makefile ASoC: SOF: Add Build support for SOF core and Intel drivers 2019-04-28 02:51:46 +09: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: compress: Add helper functions for component trigger/set_params 2019-02-06 15:51:04 +00:00
soc-core.c Merge branch 'asoc-5.1' into asoc-5.2 2019-04-26 11:02:03 +01:00
soc-dapm.c Merge branch 'asoc-5.1' into asoc-5.2 2019-04-04 15:07:34 +07: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 ASoC: More changes for v5.1 2019-02-28 13:30:55 +01: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 Merge branch 'asoc-5.1' into asoc-5.2 2019-04-26 11:02:03 +01:00
soc-topology.c Merge branch 'asoc-5.1' into asoc-5.2 2019-04-26 11:02:03 +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