linux/sound/pci/hda
Takashi Iwai 192c4cccd0 ALSA: control: Take controls_rwsem lock in snd_ctl_remove()
So far, snd_ctl_remove() requires its caller to take
card->controls_rwsem manually before the call for avoiding possible
races.  However, many callers don't care and miss the locking.

Basically it's cumbersome and error-prone to enforce it to each
caller.  Moreover, card->controls_rwsem is a field that should be used
only by internal or proper helpers, and it's not to be touched at
random external places.

This patch is an attempt to make those calls more consistent: now
snd_ctl_remove() takes the card->controls_rwsem internally, just like
other API functions for kctls.  Since a few callers already take the
controls_rwsem locks, the patch removes those locks at the same time,
too.

Link: https://lore.kernel.org/r/20230718141304.1032-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-07-20 10:01:27 +02:00
..
ca0132_regs.h
cs35l41_hda_i2c.c ALSA: Switch i2c drivers back to use .probe() 2023-06-05 09:22:45 +02:00
cs35l41_hda_spi.c ALSA: hda: cs35l41: Replace all spi->chip_select references with function call 2023-03-11 12:34:08 +00:00
cs35l41_hda.c ALSA: hda: cs35l41: Fix endian conversions 2023-06-06 14:32:05 +02:00
cs35l41_hda.h ALSA: hda: cs35l41: Support Firmware switching and reloading 2022-07-15 16:23:29 +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/cirrus: Increase AUTO_CFG_MAX_INS from 8 to 18 2021-03-07 09:17:30 +01:00
hda_beep.c ALSA: hda: beep: Simplify keep-power-at-enable behavior 2022-09-06 11:24:02 +02:00
hda_beep.h ALSA: hda: beep: Simplify keep-power-at-enable behavior 2022-09-06 11:24:02 +02: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: control: Take controls_rwsem lock in snd_ctl_remove() 2023-07-20 10:01:27 +02:00
hda_component.h ALSA: hda: cs35l41: Remove suspend/resume hda hooks 2022-10-12 08:02:48 +02:00
hda_controller_trace.h
hda_controller.c ALSA: hda: remove redundant variable in snd_hdac_stream_start() 2023-02-10 10:06:50 +01:00
hda_controller.h ALSA: hda: Fix the control element identification for multiple codecs 2023-02-03 17:19:20 +01:00
hda_cs_dsp_ctl.c ALSA: hda: cs35l41: Correct error condition handling 2023-02-14 15:06:13 +01: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: Fix Oops by 9.1 surround channel names 2023-05-16 20:44:46 +02:00
hda_generic.h ALSA: hda: Fix UAF of leds class devs at unbinding 2022-01-26 15:56:35 +01:00
hda_hwdep.c
hda_intel_trace.h
hda_intel.c ALSA: hda/intel: Workaround for WALLCLK register for loongson controller 2023-06-07 12:42:14 +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: Remove unused MAX_PIN_CONFIGS constant 2022-08-19 11:29:13 +02:00
hda_tegra.c ALSA: hda/tegra: Convert to platform remove callback returning void 2023-03-20 13:07:05 +00: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: Fix the control element identification for multiple codecs 2023-02-03 17:19:20 +01:00
Makefile ALSA: hda: hda_cs_dsp_ctl: Add Library to support CS_DSP ALSA controls 2022-07-14 11:19:37 +02:00
patch_analog.c ALSA: hda/analog - Sink ad198x_shutup() and shuffle CONFIG_PM guards 2021-08-18 07:51:09 +02:00
patch_ca0110.c ALSA: hda: Unify get_response handling 2019-12-13 14:36:52 +01:00
patch_ca0132.c ALSA: hda/ca0132: add quirk for EVGA X299 DARK 2023-05-22 08:26:01 +02:00
patch_cirrus.c ALSA: hda/cirrus - support for iMac 12,1 model 2022-08-11 07:41:43 +02:00
patch_cmedia.c
patch_conexant.c ALSA: hda/conexant: Partial revert of a quirk for Lenovo 2023-03-21 07:09:21 +01:00
patch_cs8409-tables.c ALSA: hda/cs8409: Support new Dolphin Variants 2022-08-17 11:34:25 +02:00
patch_cs8409.c ALSA: hda/cirrus: Add extra 10 ms delay to allow PLL settle and lock. 2022-12-05 17:42:36 +01:00
patch_cs8409.h ALSA: hda/cs8409: change cs8409_fixups v.pins initializers to static 2022-07-05 09:45:21 +02:00
patch_hdmi.c Merge branch 'for-next' into for-linus 2023-06-26 15:23:23 +02:00
patch_realtek.c ALSA: hda/realtek: Add quirk for ASUS ROG GZ301V 2023-07-07 08:07:49 +02:00
patch_si3054.c
patch_sigmatel.c ALSA: hda/sigmatel: fix S/PDIF out on Intel D*45* motherboards 2023-04-06 08:10:35 +02:00
patch_via.c ALSA: hda/via: Avoid potential array out-of-bound in add_secret_dac_path() 2023-01-19 11:29:16 +01:00
thinkpad_helper.c ALSA: HDA - remove the custom implementation for the audio LED trigger 2021-03-30 15:35:15 +02:00