1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-24 01:09:38 -05:00
linux/sound/soc/sof
Ajit Kumar Pandey c61711c1c9
ASoC: SOF: Fix NULL pointer exception in sof_pci_probe callback
We are accessing "desc->ops" in sof_pci_probe without checking "desc"
pointer. This results in NULL pointer exception if pci_id->driver_data
i.e desc pointer isn't defined in sof device probe:

BUG: kernel NULL pointer dereference, address: 0000000000000060
PGD 0 P4D 0
Oops: 0000 [#1] PREEMPT SMP NOPTI
RIP: 0010:sof_pci_probe+0x1e/0x17f [snd_sof_pci]
Code: Unable to access opcode bytes at RIP 0xffffffffc043dff4.
RSP: 0018:ffffac4b03b9b8d8 EFLAGS: 00010246

Add NULL pointer check for sof_dev_desc pointer to avoid such exception.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220426183357.102155-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-27 14:15:21 +01:00
..
amd ASoC: SOF: Make pcm_hw_params snd_sof_dsp_ops callback IPC neutral 2022-03-11 13:41:01 +00:00
imx ASoC: SOF: imx: Convert to use the generic set_stream_data_offset ops 2022-03-11 13:41:08 +00:00
intel ASoC: Fixes for v5.18 2022-03-30 14:04:22 +02:00
mediatek
xtensa
compress.c ASoC: SOF: compress: fix null check after dereference 2022-03-11 13:40:54 +00:00
control.c ASoC: SOF: Add bytes_ext control IPC ops for IPC3 2022-03-18 16:04:44 +00:00
core.c ASoC: SOF: Introduce struct snd_sof_dai_link 2022-03-16 16:38:54 +00:00
debug.c
iomem-utils.c
ipc.c ASoC: SOF: Introduce IPC3 PCM hw_free op 2022-03-18 16:04:47 +00:00
ipc3-control.c ASoC: SOF: Add bytes_ext control IPC ops for IPC3 2022-03-18 16:04:44 +00:00
ipc3-ops.h ASoC: SOF: Introduce IPC3 PCM hw_free op 2022-03-18 16:04:47 +00:00
ipc3-pcm.c ASoC: SOF: Add dai_link_fixup PCM op for IPC3 2022-03-18 16:04:50 +00:00
ipc3-topology.c ASoC: SOF: Add a new dai_get_clk topology IPC op 2022-03-18 16:04:53 +00:00
ipc3.c ASoC: SOF: Introduce IPC3 PCM hw_free op 2022-03-18 16:04:47 +00:00
Kconfig
loader.c
Makefile ASoC: SOF: Introduce IPC3 PCM hw_free op 2022-03-18 16:04:47 +00:00
nocodec.c
ops.c
ops.h ASoC: SOF: Remove ipc_pcm_params() ops 2022-03-11 13:41:09 +00:00
pcm.c ASoC: SOF: Add dai_link_fixup PCM op for IPC3 2022-03-18 16:04:50 +00:00
pm.c ASoC: SOF: topology: Add ops for setting up and tearing down pipelines 2022-03-18 16:04:52 +00:00
sof-acpi-dev.c
sof-acpi-dev.h
sof-audio.c ASoC: SOF: Add a new dai_get_clk topology IPC op 2022-03-18 16:04:53 +00:00
sof-audio.h ASoC: SOF: Add a new dai_get_clk topology IPC op 2022-03-18 16:04:53 +00:00
sof-client-ipc-flood-test.c
sof-client-ipc-msg-injector.c
sof-client-probes.c
sof-client-probes.h
sof-client.c
sof-client.h
sof-of-dev.c
sof-of-dev.h
sof-pci-dev.c ASoC: SOF: Fix NULL pointer exception in sof_pci_probe callback 2022-04-27 14:15:21 +01:00
sof-pci-dev.h
sof-priv.h ASoC: SOF: Introduce IPC-specific PCM ops 2022-03-18 16:04:45 +00:00
sof-utils.c
sof-utils.h
stream-ipc.c ASoC: SOF: Remove ipc_pcm_params() ops 2022-03-11 13:41:09 +00:00
topology.c ASoC: SOF: topology: Fix memory leak in sof_control_load() 2022-04-07 18:29:37 +01:00
trace.c ASoC: SOF: trace: Use proper DMA direction for the trace data buffer 2022-03-11 13:40:55 +00:00