linux/sound
Gergo Koteles 75a25d31b8 ALSA: hda/tas2781: leave hda_component in usable state
Unloading then loading the module causes a NULL ponter dereference.

The hda_unbind zeroes the hda_component, later the hda_bind tries
to dereference the codec field.

The hda_component is only initialized once by tas2781_generic_fixup.

Set only previously modified fields to NULL.

BUG: kernel NULL pointer dereference, address: 0000000000000322
Call Trace:
 <TASK>
 ? __die+0x23/0x70
 ? page_fault_oops+0x171/0x4e0
 ? exc_page_fault+0x7f/0x180
 ? asm_exc_page_fault+0x26/0x30
 ? tas2781_hda_bind+0x59/0x140 [snd_hda_scodec_tas2781_i2c]
 component_bind_all+0xf3/0x240
 try_to_bring_up_aggregate_device+0x1c3/0x270
 __component_add+0xbc/0x1a0
 tas2781_hda_i2c_probe+0x289/0x3a0 [snd_hda_scodec_tas2781_i2c]
 i2c_device_probe+0x136/0x2e0

Fixes: 5be27f1e3e ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Cc: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu>
Link: https://lore.kernel.org/r/8b8ed2bd5f75fbb32e354a3226c2f966fa85b46b.1702156522.git.soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-10 10:06:31 +01:00
..
ac97 ALSA: ac97: set variables dev_attr_vendor_id to static 2023-08-02 09:27:39 +02:00
aoa ALSA: aoa: Replace with __packed attribute 2023-10-26 09:43:11 +02:00
arm ASoC: arm: convert not to use asoc_xxx() 2023-09-25 14:16:16 +02:00
atmel ALSA: Explicitly include correct DT includes 2023-07-16 14:50:56 +02:00
core ALSA: pcm: fix out-of-bounds in snd_pcm_state_names 2023-12-06 08:18:29 +01:00
drivers ALSA: pcmtest: stop timer before buffer is released 2023-12-07 08:33:06 +01:00
firewire ALSA: firewire: Fix -Wformat-truncation warning for MIDI stream names 2023-09-15 13:22:06 +02:00
hda ALSA: hda: intel-nhlt: Ignore vbps when looking for DMIC 32 bps format 2023-11-27 17:20:58 +01:00
i2c
isa ALSA: cs4231: Fix -Wformat-truncation warning for longname string 2023-09-15 13:23:01 +02:00
mips
oss OSS: dmasound/paula: Convert to platform remove callback returning void 2023-11-09 17:44:52 +01:00
parisc
pci ALSA: hda/tas2781: leave hda_component in usable state 2023-12-10 10:06:31 +01:00
pcmcia ALSA: add HAS_IOPORT dependencies 2023-05-22 16:43:47 +02:00
ppc ALSA: Explicitly include correct DT includes 2023-07-16 14:50:56 +02:00
sh ALSA: sh: Convert to generic PCM copy ops 2023-08-18 12:18:24 +02:00
soc ASoC: Fixes for v6.7 2023-12-06 14:56:00 +01:00
sparc ALSA: Explicitly include correct DT includes 2023-07-16 14:50:56 +02:00
spi
synth ALSA: emu10k1: fix synthesizer pitch for E-MU cards at 44.1 kHz 2023-06-13 07:42:08 +02:00
usb ALSA: usb-audio: Add Pioneer DJM-450 mixer controls 2023-12-04 15:22:14 +01:00
virtio ALSA: virtio: use ack callback 2023-10-27 11:25:07 +02:00
x86
xen ALSA: xen: Fix -Wformat-truncation warning 2023-09-15 13:21:35 +02:00
ac97_bus.c
Kconfig This pull request contains the following changes for UML: 2023-09-04 11:32:21 -07:00
last.c
Makefile
sound_core.c sound: make all 'class' structures const 2023-06-21 07:29:10 +02:00