linux/sound/pci
Richard Fitzgerald 28b329f431 ALSA: hda: hda_component: Fix mutex crash if nothing ever binds
Move the initialization of parent->mutex into
hda_component_manager_init() so that it is always valid.

In hda_component_manager_bind() do not clear the parent information.
Only zero-fill the per-component data ready for it to be filled in
by the components as they bind.

Previously parent->mutex was being initialized only in
hda_component_manager_bind(). This meant that it was only
initialized if all components appeared and there was a bind callback.
If there wasn't a bind the mutex object was not valid when the
Realtek driver called any of the other functions.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 047b9cbbaa ("ALSA: hda: hda_component: Protect shared data with a mutex")
Link: https://patch.msgid.link/20240826094940.45563-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-08-26 12:03:57 +02:00
..
ac97 ALSA: ac97: More cleanup with snd_ctl_find_id_mixer() 2024-03-04 09:22:51 +01:00
ali5451 ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
asihpi ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
au88x0 ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
aw2 ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
ca0106 ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
cs46xx ALSA: cs46xx: Simplify with snd_ctl_find_id_mixer() 2023-07-21 09:10:39 +02:00
cs5535audio ALSA: cs5535audio: Remove the redundant assignment 2022-11-07 09:16:31 +01:00
ctxfi ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
echoaudio ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
emu10k1 ALSA: pcm: optimize and clarify stream synchronization ID API 2024-07-02 09:53:21 +02:00
hda ALSA: hda: hda_component: Fix mutex crash if nothing ever binds 2024-08-26 12:03:57 +02:00
ice1712 ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
korg1212 ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
lola
lx6464es ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
mixart ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
nm256 ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
oxygen ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
pcxhr ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
riptide ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
rme9652 ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
trident ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
vx222 ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
ymfpci ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
ad1889.c
ad1889.h
ak4531_codec.c
als300.c ALSA: als300: Replace with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:24 +01:00
als4000.c ALSA: als4000: Replace with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:24 +01:00
atiixp_modem.c ALSA: atiixp: Replace with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:24 +01:00
atiixp.c ALSA: atiixp: Replace with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:24 +01:00
azt3328.c ALSA: azt3328: Simplify with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:25 +01:00
azt3328.h
bt87x.c
cmipci.c ALSA: cmipci: Simplify with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:25 +01:00
cs4281.c ALSA: cs4281: Simplify with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:25 +01:00
cs5530.c
ens1370.c ALSA: ens137x: Replace with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:24 +01:00
ens1371.c
es1938.c ALSA: es1938: Simplify with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:26 +01:00
es1968.c ALSA: es1968: Simplify with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:26 +01:00
fm801.c ALSA: fm801: Simplify with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:26 +01:00
intel8x0.c ALSA: intel8x0: Replace with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:24 +01:00
intel8x0m.c ALSA: intel8x0: Replace with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:24 +01:00
Kconfig ALSA: add HAS_IOPORT dependencies 2023-05-22 16:43:47 +02:00
maestro3.c ALSA: maestro3: Simplify with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:26 +01:00
Makefile ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
rme32.c ALSA: rme32: Convert to generic PCM copy ops 2023-08-18 12:18:21 +02:00
rme96.c ALSA: rme96: Simplify with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:26 +01:00
sis7019.c ALSA: sis7019: Simplify with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:26 +01:00
sis7019.h
sonicvibes.c
via82xx_modem.c ALSA: via82xx: Simplify with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:26 +01:00
via82xx.c ALSA: via82xx: Simplify with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:26 +01:00