linux/sound/pci/hda
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
..
ca0132_regs.h
cirrus_scodec_test.c ALSA: hda: cirrus_scodec_test: Add missing module descriptions 2024-05-09 10:13:07 +02:00
cirrus_scodec.c ALSA: hda: cs35l56: Add support for speaker id 2023-09-18 17:49:26 +02:00
cirrus_scodec.h ALSA: hda: cs35l56: Add support for speaker id 2023-09-18 17:49:26 +02:00
cs35l41_hda_i2c.c ALSA: hda: cs35l41: Prevent firmware load if SPI speed too low 2023-12-29 14:28:29 +01:00
cs35l41_hda_property.c Merge branch 'for-next' into for-linus 2024-07-15 08:17:55 +02:00
cs35l41_hda_property.h ALSA: hda: cs35l41: Support systems with missing _DSD properties 2023-08-15 20:51:19 +02:00
cs35l41_hda_spi.c ALSA: hda: cs35l41: Prevent firmware load if SPI speed too low 2023-12-29 14:28:29 +01:00
cs35l41_hda.c ALSA: hda: cs35l41: Remove redundant call to hda_cs_dsp_control_remove() 2024-08-13 13:43:00 +02:00
cs35l41_hda.h ALSA: hda: cs35l41: Fix missing Speaker ID GPIO description in _DSD 2024-07-04 14:47:12 +02:00
cs35l56_hda_i2c.c ALSA: hda: cs35l56: Add ACPI device match tables 2024-03-28 14:27:20 +01:00
cs35l56_hda_spi.c ALSA: hda: cs35l56: Add ACPI device match tables 2024-03-28 14:27:20 +01:00
cs35l56_hda.c ALSA: hda: cs35l56: Don't use the device index as a calibration index 2024-08-21 15:23:33 +02:00
cs35l56_hda.h ALSA: hda: cs35l56: Stop creating ALSA controls for firmware coefficients 2024-08-05 09:49:03 +02:00
hda_auto_parser.c ALSA: hda/realtek: Apply fixup for Lenovo Yoga Duet 7 properly 2022-06-15 07:28:51 +02:00
hda_auto_parser.h ALSA: hda: Fix missing header dependencies 2023-07-23 23:40:22 +01:00
hda_beep.c ALSA: hda: beep: Drop stale mutex 2024-02-22 17:26:53 +01:00
hda_beep.h ALSA: hda: beep: Drop stale mutex 2024-02-22 17:26:53 +01:00
hda_bind.c ASoC: do not include pm_runtime.h if not used 2023-05-23 13:55:55 +01:00
hda_codec.c ALSA: hda: Return -EINVAL for invalid volume/switch inputs 2024-06-18 12:00:18 +02:00
hda_component.c ALSA: hda: hda_component: Fix mutex crash if nothing ever binds 2024-08-26 12:03:57 +02:00
hda_component.h ALSA: hda: hda_component: Protect shared data with a mutex 2024-06-18 11:58:45 +02:00
hda_controller_trace.h
hda_controller.c ALSA: hda: Remove convert_art_to_tsc() 2024-06-03 11:18:50 +02:00
hda_controller.h ALSA: hda: Conditionally use snooping for AMD HDMI 2024-07-31 19:05:58 +02:00
hda_cs_dsp_ctl.c ALSA: hda: Drop NULL check for snd_ctl_remove() 2024-06-18 12:54:08 +02:00
hda_cs_dsp_ctl.h ALSA: hda/cs_dsp_ctl: Fix mutex inversion when creating controls 2022-10-12 08:02:47 +02:00
hda_eld.c ALSA: hda/hdmi: ELD procfs - print the codec NIDs 2022-09-21 12:12:29 +02:00
hda_generic.c ALSA: hda/generic: Add a helper to mute speakers at suspend/shutdown 2024-07-26 16:36:01 +02:00
hda_generic.h ALSA: hda/generic: Add a helper to mute speakers at suspend/shutdown 2024-07-26 16:36:01 +02:00
hda_hwdep.c ALSA: hwdep: Don't embed device 2023-08-17 09:24:01 +02:00
hda_intel_trace.h ALSA: hda: intel: Reduce CONFIG_PM dependencies 2024-05-08 18:05:07 +02:00
hda_intel.c ALSA: hda: Conditionally use snooping for AMD HDMI 2024-07-31 19:05:58 +02:00
hda_intel.h
hda_jack.c
hda_jack.h
hda_local.h ALSA: hda/hdmi: ELD procfs - print the codec NIDs 2022-09-21 12:12:29 +02:00
hda_proc.c
hda_sysfs.c ALSA: hda: codec: Reduce CONFIG_PM dependencies 2024-05-08 18:05:08 +02:00
hda_tegra.c ALSA: hda/tegra: refactor deprecated strncpy 2023-08-08 14:46:11 +02:00
hp_x360_helper.c
ideapad_s740_helper.c
Kconfig Merge branch 'for-linus' into for-next 2024-06-25 11:56:22 +02:00
Makefile ALSA: hda/senarytech: add senarytech codec support 2024-06-18 11:59:08 +02:00
patch_analog.c ALSA: hda: analog: Reduce CONFIG_PM dependencies 2024-05-08 18:05:08 +02:00
patch_ca0110.c
patch_ca0132.c ALSA: hda: ca0132: Reduce CONFIG_PM dependencies 2024-05-08 18:05:08 +02:00
patch_cirrus.c ALSA: hda: cirrus: Reduce CONFIG_PM dependencies 2024-05-08 18:05:08 +02:00
patch_cmedia.c
patch_conexant.c ALSA: hda/conexant: Mute speakers at suspend / shutdown 2024-07-26 16:36:10 +02:00
patch_cs8409-tables.c ALSA: hda/cs8409: Support new Dell Dolphin Variants 2023-08-11 16:45:52 +02:00
patch_cs8409.c ALSA: hda: cs4809: Reduce CONFIG_PM dependencies 2024-05-08 18:05:08 +02:00
patch_cs8409.h ALSA: hda/cirrus: Fix broken audio on hardware with two CS42L42 codecs. 2023-09-04 18:09:24 +02:00
patch_hdmi.c ALSA: hda/hdmi: Yet more pin fix for HP EliteDesk 800 G4 2024-08-06 09:02:00 +02:00
patch_realtek.c ALSA: hda/realtek: support HP Pavilion Aero 13-bg0xxx Mute LED 2024-08-26 10:30:53 +02:00
patch_senarytech.c ALSA: hda/senarytech: add senarytech codec support 2024-06-18 11:59:08 +02:00
patch_si3054.c
patch_sigmatel.c ALSA: hda: sigmantel: Reduce CONFIG_PM dependencies 2024-05-08 18:05:08 +02:00
patch_via.c ALSA: hda: via: Reduce CONFIG_PM dependencies 2024-05-08 18:05:08 +02:00
samsung_helper.c ALSA: hda/realtek: Implement sound init sequence for Samsung Galaxy Book3 Pro 360 2024-07-25 10:54:45 +02:00
tas2781_hda_i2c.c ALSA: hda/tas2781: Use correct endian conversion 2024-08-14 16:58:26 +02:00
thinkpad_helper.c