linux-stable/sound
Hans de Goede a2d6d84db2
ASoC: rt5640: Fix possible NULL pointer deref on resume
Commit 2b9c8d2b3c ("ASoC: rt5640: Add the HDA header support") adds
re-queuing of the jack_work on resume when rt5640->jd_src != 0.

But the jack_work will unconditionally deref rt5640->jack and that might
be NULL. E.g. the sound/soc/intel/boards/bytcr_rt5640.c machine driver
call snd_soc_component_set_jack(codec, NULL, NULL) from pre_suspend to
disable the IRQ to avoid spurious wakeups, so when rt5640_resume()
runs rt5640->jack will be NULL in this case.

Make the queueing of the work conditional on rt5640->jack instead of
on rt5640->jd_src to fix this.

Fixes: 2b9c8d2b3c ("ASoC: rt5640: Add the HDA header support")
Cc: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20220106110128.66049-2-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-01-06 13:55:47 +00:00
..
ac97 bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
aoa Kbuild updates for v5.15 2021-09-03 15:33:47 -07:00
arm ALSA: pxa2xx: Use managed PCM buffer allocation 2021-08-04 08:08:21 +02:00
atmel
core dmaengine_topic_slave_id_removal_5.17 2021-12-17 11:13:39 +00:00
drivers ALSA: pcsp: Make hrtimer forwarding more robust 2021-09-28 10:58:08 +02:00
firewire ALSA: fireworks: add support for Loud Onyx 1200f quirk 2021-11-11 14:02:02 +01:00
hda ASoC: Updates for v5.16 2021-11-01 16:58:27 +01:00
i2c
isa ALSA: gus: fix null pointer dereference on pointer block 2021-10-26 08:02:16 +02:00
mips
oss
parisc parisc architecture updates for kernel 5.15: 2021-09-02 13:16:00 -07:00
pci ALSA: hda: fix general protection fault in azx_runtime_idle 2021-11-10 22:48:31 +01:00
pcmcia ALSA: vx: Manage vx_core object with devres 2021-07-19 16:17:09 +02:00
ppc
sh
soc ASoC: rt5640: Fix possible NULL pointer deref on resume 2022-01-06 13:55:47 +00:00
sparc
spi
synth ALSA: synth: missing check for possible NULL after the call to kstrdup 2021-11-09 07:18:50 +01:00
usb ALSA: usb-audio: Add quirk for Audient iD14 2021-11-02 17:19:26 +01:00
virtio ALSA: virtio: Replace zero-length array with flexible-array member 2021-09-30 13:47:57 +02:00
x86 ALSA: memalloc: Correctly name as WC 2021-08-04 08:07:58 +02:00
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c