linux/sound/pci/hda
Richard Fitzgerald 172811e3a5 ALSA: hda/cs_dsp_ctl: Use private_free for control cleanup
Use the control private_free callback to free the associated data
block. This ensures that the memory won't leak, whatever way the
control gets destroyed.

The original implementation didn't actually remove the ALSA
controls in hda_cs_dsp_control_remove(). It only freed the internal
tracking structure. This meant it was possible to remove/unload the
amp driver while leaving its ALSA controls still present in the
soundcard. Obviously attempting to access them could cause segfaults
or at least dereferencing stale pointers.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 3233b978af ("ALSA: hda: hda_cs_dsp_ctl: Add Library to support CS_DSP ALSA controls")
Link: https://lore.kernel.org/r/20240508095627.44476-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-08 18:18:18 +02:00
..
ca0132_regs.h
cirrus_scodec_test.c ALSA: hda: cirrus_scodec: fix an error code 2023-09-30 09:47:17 +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 ALSA: hda/realtek: Fix internal speakers for Legion Y9000X 2022 IAH7 2024-05-08 18:17:22 +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: Ignore errors when configuring IRQs 2024-05-08 18:14:17 +02:00
cs35l41_hda.h ALSA: hda: cs35l41: Use shared cs-amp-lib to apply calibration 2024-04-18 08:43:19 +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: Exit cache-only after cs35l56_wait_for_firmware_boot() 2024-04-08 14:09:59 +01:00
cs35l56_hda.h ALSA: hda: cs35l56: Add support for CS35L54 and CS35L57 2024-03-08 17:59:19 +01: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: codec: Reduce CONFIG_PM dependencies 2024-05-08 18:05:08 +02:00
hda_component.c ALSA: hda: realtek: Move hda_component implementation to module 2024-01-25 10:02:58 +01:00
hda_component.h ALSA: hda: hda_component: Include sound/hda_codec.h 2024-03-07 17:27:46 +01:00
hda_controller_trace.h
hda_controller.c Merge branch 'topic/hda-config-pm-cleanup' into for-next 2024-05-08 18:16:58 +02:00
hda_controller.h ALSA: hda: Introduce flags to force commands via PIO instead of CORB 2024-04-18 08:38:54 +02:00
hda_cs_dsp_ctl.c ALSA: hda/cs_dsp_ctl: Use private_free for control cleanup 2024-05-08 18:18:18 +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: Reduce CONFIG_PM dependencies 2024-05-08 18:05:08 +02:00
hda_generic.h ALSA: hda: generic: Reduce CONFIG_PM dependencies 2024-05-08 18:05:08 +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 Merge branch 'topic/hda-config-pm-cleanup' into for-next 2024-05-08 18:16:58 +02:00
hda_intel.h ALSA: hda: intel: Allow repeatedly probing on codec configuration errors 2021-10-07 09:15:22 +02:00
hda_jack.c ALSA: hda: Do disconnect jacks at codec unbind 2021-11-17 14:41:16 +01:00
hda_jack.h ALSA: hda: Do disconnect jacks at codec unbind 2021-11-17 14:41:16 +01:00
hda_local.h ALSA: hda/hdmi: ELD procfs - print the codec NIDs 2022-09-21 12:12:29 +02:00
hda_proc.c ALSA: hda/proc - print DP-MST connections 2020-12-08 20:04:33 +01:00
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 ALSA: hda/realtek: Add quirk for Lenovo Ideapad S740 2021-04-16 10:12:50 +02:00
Kconfig ALSA: hda: cs35l41: Use shared cs-amp-lib to apply calibration 2024-04-18 08:43:19 +02:00
Makefile ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +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: Reduce CONFIG_PM dependencies 2024-05-08 18:05:08 +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 Merge branch 'topic/hda-config-pm-cleanup' into for-next 2024-05-08 18:16:58 +02:00
patch_realtek.c ALSA: hda/realtek: Add support for ASUS Zenbook 2024 HN7306W 2024-05-08 18:17:27 +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
tas2781_hda_i2c.c ALSA: hda/tas2781: correct the register for pow calibrated data 2024-04-07 08:32:14 +02:00
thinkpad_helper.c ALSA: HDA - remove the custom implementation for the audio LED trigger 2021-03-30 15:35:15 +02:00