mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-07 14:51:39 +00:00
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>
|
||
|---|---|---|
| .. | ||
| Makefile | ||
| soc-acpi-intel-bxt-match.c | ||
| soc-acpi-intel-byt-match.c | ||
| soc-acpi-intel-cht-match.c | ||
| soc-acpi-intel-cnl-match.c | ||
| soc-acpi-intel-glk-match.c | ||
| soc-acpi-intel-hda-match.c | ||
| soc-acpi-intel-hsw-bdw-match.c | ||
| soc-acpi-intel-icl-match.c | ||
| soc-acpi-intel-kbl-match.c | ||
| soc-acpi-intel-skl-match.c | ||
| sst-acpi.c | ||
| sst-dsp-priv.h | ||
| sst-dsp.c | ||
| sst-dsp.h | ||
| sst-firmware.c | ||
| sst-ipc.c | ||
| sst-ipc.h | ||