linux_dsm_epyc7002/sound/soc/intel
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
..
atom ASoC: intel: Fix crash at suspend/resume after failed codec registration 2019-03-25 12:09:13 +00:00
baytrail ASoC: Updates for v5.1 2019-02-08 14:20:32 +01:00
boards ASoC: Intel: Make boards more available for compile test 2019-05-02 10:46:09 +09:00
common ASoC: Intel: avoid Oops if DMA setup fails 2019-05-03 14:55:18 +09:00
haswell ASoC: Intel: Haswell: Remove set but not used variable 'stage_type' 2019-04-19 17:00:59 +01:00
skylake ASoC: core: conditionally increase module refcount on component open 2019-04-08 14:15:44 +07:00
Kconfig ASoC: Intel: Kconfig: expose common option between SST and SOF drivers 2019-04-28 02:51:41 +09:00
Makefile ASoC: Intel: Fix Kconfig with top-level selector 2018-01-08 16:18:48 +00:00