mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-24 01:09:38 -05:00
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> |
||
---|---|---|
.. | ||
amd | ||
imx | ||
intel | ||
mediatek | ||
xtensa | ||
compress.c | ||
control.c | ||
core.c | ||
debug.c | ||
iomem-utils.c | ||
ipc.c | ||
ipc3-control.c | ||
ipc3-ops.h | ||
ipc3-pcm.c | ||
ipc3-topology.c | ||
ipc3.c | ||
Kconfig | ||
loader.c | ||
Makefile | ||
nocodec.c | ||
ops.c | ||
ops.h | ||
pcm.c | ||
pm.c | ||
sof-acpi-dev.c | ||
sof-acpi-dev.h | ||
sof-audio.c | ||
sof-audio.h | ||
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 | ||
sof-pci-dev.h | ||
sof-priv.h | ||
sof-utils.c | ||
sof-utils.h | ||
stream-ipc.c | ||
topology.c | ||
trace.c |