linux/sound
John Stultz 89ff7d0c86 ANDROID: ASoC: core: Fix soc_pcm_hw_params crash
In testing some db845c audio patches, I came across a crash (see
below) that I only could reproduce on android-mainline and not
with Linus' tree.

I chased down the issue to a null pointer traversal that was
introduced commit 9cb7ec3e9b ("ANDROID: ASoC: core - add
hostless DAI support").

This patch adds an extra check to avoid the null traversal

[   74.058167] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010
...
[   74.130054] Hardware name: Thundercomm Dragonboard 845c (DT)
[   74.135777] pstate: 80400005 (Nzcv daif +PAN -UAO)
[   74.140639] pc : soc_pcm_hw_params+0x194/0x690
[   74.145141] lr : soc_pcm_hw_params+0x88/0x690
[   74.149544] sp : ffffffc01249b9d0
...
[   74.233392] Call trace:
[   74.235878]  soc_pcm_hw_params+0x194/0x690
[   74.240028]  dpcm_fe_dai_hw_params+0xb0/0x130
[   74.244435]  snd_pcm_hw_params+0xf8/0x3f8
[   74.248492]  snd_pcm_ioctl_hw_params_compat+0x148/0x288
[   74.253769]  snd_pcm_ioctl_compat+0x764/0x8c8
[   74.258178]  __arm64_compat_sys_ioctl+0xf4/0x110
[   74.262850]  el0_svc_common.constprop.2+0x78/0x188
[   74.267698]  do_el0_svc_compat+0x2c/0x38
[   74.271666]  el0_sync_compat_handler+0x130/0x180
[   74.276334]  el0_sync_compat+0x144/0x180
[   74.280306] Code: 12000400 7100041f 54002120 f9403420 (f9400802)
[   74.286464] ---[ end trace 3c2126d28e1f9af7 ]---
[   74.291131] Kernel panic - not syncing: Fatal exception

Fixes: 9cb7ec3e9b ("ANDROID: ASoC: core - add hostless DAI support")
Change-Id: Ib7addfee4ac7382824fcc12057b93a956e6ae5f4
Signed-off-by: John Stultz <john.stultz@linaro.org>
2020-03-01 23:10:18 +00:00
..
ac97 ALSA: ac97: Constify snd_ac97_bus_ops definitions 2020-01-03 09:24:11 +01:00
aoa ALSA: aoa: More constifications 2020-01-05 16:14:27 +01:00
arm ALSA: arm: More constification 2020-01-05 16:15:07 +01:00
atmel ALSA: atmel: Constify snd_ac97_bus_ops definitions 2020-01-03 09:24:12 +01:00
core Linux 5.6-rc3 2020-02-24 09:22:04 +01:00
drivers sound fixes for 5.6-rc1 2020-02-06 14:15:01 +00:00
firewire Merge branch 'for-linus' into for-next 2020-01-20 11:44:51 +01:00
hda ASoC: Fixes for v5.6 2020-02-18 13:33:39 +01:00
i2c ALSA: i2c: Constify snd_kcontrol_new items 2020-01-03 09:24:24 +01:00
isa sound updates for 5.6-rc1 2020-01-28 16:26:57 -08:00
mips ALSA: mips: Constify snd_device_ops definitions 2020-01-03 09:24:02 +01:00
oss compat_ioctl: remove translation for sound ioctls 2019-10-23 17:23:45 +02:00
parisc sound updates for 5.6-rc1 2020-01-28 16:26:57 -08:00
pci ALSA: hda: Use scnprintf() for printing texts for sysfs/procfs 2020-02-18 10:15:41 +01:00
pcmcia ALSA: pdaudiocf: More constification 2020-01-05 16:15:13 +01:00
ppc ALSA: ppc: More constifications 2020-01-05 16:14:43 +01:00
sh ALSA: sh: Fix compile warning wrt const 2020-01-05 16:15:14 +01:00
soc ANDROID: ASoC: core: Fix soc_pcm_hw_params crash 2020-03-01 23:10:18 +00:00
sparc ALSA: sparc: More constifications 2020-01-05 16:14:56 +01:00
spi ALSA: spi: More constification 2020-01-05 16:15:13 +01:00
synth ALSA: emux: More constifications 2020-01-05 16:14:46 +01:00
usb Linux 5.6-rc2 2020-02-19 08:28:52 +01:00
x86 sound updates for 5.6-rc1 2020-01-28 16:26:57 -08:00
xen ALSA: xen: Drop superfluous ioctl PCM ops 2019-12-11 07:25:35 +01:00
ac97_bus.c ALSA: ac97: Treat snd_ac97_bus_ops as const 2020-01-03 09:24:08 +01:00
Kconfig
last.c
Makefile
sound_core.c sound: fix a memory leak bug 2019-08-08 08:18:32 +02:00