linux/sound/isa/sb
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
..
emu8000_callback.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
emu8000_local.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
emu8000_patch.c ALSA: sb: Fix assignment in if condition 2021-06-09 17:29:35 +02:00
emu8000_pcm.c ALSA: sb: Use DIV_ROUND_UP() instead of open-coding it 2022-09-29 08:11:55 +02:00
emu8000_synth.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
emu8000.c ALSA: control: Take controls_rwsem lock in snd_ctl_remove() 2023-07-20 10:01:27 +02:00
jazz16.c ALSA: sb: Allocate resources with device-managed APIs 2021-07-19 16:17:14 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sb8_main.c ALSA: sb: Fix assignment in if condition 2021-06-09 17:29:35 +02:00
sb8_midi.c ALSA: sb: Fix assignment in if condition 2021-06-09 17:29:35 +02:00
sb8.c ALSA: sb: Allocate resources with device-managed APIs 2021-07-19 16:17:14 +02:00
sb16_csp.c ALSA: control: Take controls_rwsem lock in snd_ctl_remove() 2023-07-20 10:01:27 +02:00
sb16_main.c ASoC: Fixes for v5.13 2021-06-24 10:02:45 +02:00
sb16.c ALSA: sb: Allocate resources with device-managed APIs 2021-07-19 16:17:14 +02:00
sb_common.c ALSA: sb: Allocate resources with device-managed APIs 2021-07-19 16:17:14 +02:00
sb_mixer.c ALSA: sb: Fix assignment in if condition 2021-06-09 17:29:35 +02:00
sbawe.c