linux-stable/sound/soc
Ajit Kumar Pandey a1c27ea040 ASoC: SOF: Fix NULL pointer exception in sof_pci_probe callback
[ Upstream commit c61711c1c9 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 10:28:17 +02:00
..
adi
amd ASoC: amd: vangogh: fix uninitialized symbol warning in machine driver 2022-04-08 13:58:45 +02:00
atmel ASoC: atmel: Remove system clock tree configuration for at91sam9g20ek 2022-04-27 14:40:55 +02:00
au1x
bcm ASoC: bcm: Use platform_get_irq() to get the interrupt 2021-12-21 18:05:43 +00:00
cirrus
codecs ASoC: max98090: Generate notifications on changes for custom control 2022-05-18 10:28:17 +02:00
dwc ASoC: dwc-i2s: Handle errors for clk_enable 2022-04-08 13:57:50 +02:00
fsl ASoC: imx-es8328: Fix error return code in imx_es8328_probe() 2022-04-08 13:57:53 +02:00
generic ASoC: simple-card-utils: Set sysclk on all components 2022-04-08 13:57:42 +02:00
hisilicon
img ASoC: img: Use dev_err_probe() helper 2021-12-20 12:47:16 +00:00
intel ASoC: Intel: soc-acpi: correct device endpoints for max98373 2022-05-09 09:16:27 +02:00
jz4740
kirkwood
mediatek ASoC: mediatek: Fix error handling in mt8183_da7219_max98357_dev_probe 2022-04-08 13:58:46 +02:00
meson ASoC: meson: axg-card: Fix nonatomic links 2022-05-12 12:32:28 +02:00
mxs ASoC: mxs: Fix error handling in mxs_sgtl5000_probe 2022-04-08 13:57:52 +02:00
pxa
qcom ASoC: qcom: Actually clear DMA interrupt register for HDMI 2022-02-10 13:14:38 +00:00
rockchip ASoC: rockchip: i2s_tdm: Fixup config for SND_SOC_DAIFMT_DSP_A/B 2022-04-08 13:58:56 +02:00
samsung ASoC: samsung: idma: Check of ioremap return value 2021-12-29 12:45:46 +00:00
sh ASoC: sh: rz-ssi: Make the data structures available before registering the handlers 2022-04-08 13:58:41 +02:00
sof ASoC: SOF: Fix NULL pointer exception in sof_pci_probe callback 2022-05-18 10:28:17 +02:00
spear
sprd
sti ASoC: sti: Fix deadlock via snd_pcm_stop_xrun() call 2022-03-28 10:03:18 +02:00
stm ASoC: stm: Use dev_err_probe() helper 2021-12-20 12:47:23 +00:00
sunxi ASoC: sunxi: Use dev_err_probe() helper 2021-12-20 12:47:24 +00:00
tegra ASoC: Merge fixes 2021-12-31 13:23:28 +00:00
ti ASoC: ti: davinci-i2s: Add check for clk_enable() 2022-04-08 13:57:49 +02:00
uniphier
ux500
xilinx ASoC: xilinx: xlnx_formatter_pcm: Handle sysclk setting 2022-04-08 13:57:42 +02:00
xtensa
Kconfig
Makefile
soc-ac97.c
soc-acpi.c ALSA: Replace acpi_bus_get_device() 2022-02-01 08:08:08 +01:00
soc-card.c
soc-component.c ASoC: soc-component: add snd_soc_pcm_component_delay() 2021-11-29 12:19:41 +00:00
soc-compress.c ASoC: soc-compress: Change the check for codec_dai 2022-04-08 13:58:59 +02:00
soc-core.c ASoC: soc-core: skip zero num_dai component in searching dai name 2022-04-08 13:58:44 +02:00
soc-dai.c ASoC: soc-dai: update snd_soc_dai_delay() to snd_soc_pcm_dai_delay() 2021-11-29 12:19:40 +00:00
soc-dapm.c ASoC: soc-dapm: fix two incorrect uses of list iterator 2022-04-27 14:41:14 +02:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: dmaengine: Restore NULL prepare_slave_config() callback 2022-05-12 12:32:27 +02:00
soc-jack.c
soc-link.c
soc-ops.c ASoC: ops: Validate input values in snd_soc_put_volsw_range() 2022-05-18 10:28:17 +02:00
soc-pcm.c ASoC: soc-pcm: use GFP_KERNEL when the code is sleepable 2022-05-09 09:16:27 +02:00
soc-topology-test.c
soc-topology.c ASoC: topology: Correct error handling in soc_tplg_dapm_widget_create() 2022-04-27 14:40:55 +02:00
soc-utils.c