patch "staging: greybus: Add missing rwsem around snd_ctl_remove() calls" added to staging-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
staging: greybus: Add missing rwsem around snd_ctl_remove() calls
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From ffcf7ae90f4489047d7b076539ba207024dea5f6 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
Date: Tue, 16 Nov 2021 08:20:27 +0100
Subject: staging: greybus: Add missing rwsem around snd_ctl_remove() calls
snd_ctl_remove() has to be called with card->controls_rwsem held (when called after the card instantiation). This patch adds the missing rwsem calls around it.
--- drivers/staging/greybus/audio_helper.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/staging/greybus/audio_helper.c +6 -2
@@ -192,7 +192,11 @@ int gbaudio_remove_component_controls(struct snd_soc_component *component, unsigned int num_controls) {struct snd_card *card = component->card->snd_card; +int err; -return gbaudio_remove_controls (card, component->dev, controls, - num_controls, component->name_prefix); +down_write (&card->controls_rwsem); + err =gbaudio_remove_controls (card, component->dev, controls, + num_controls, component->name_prefix); +up_write (&card->controls_rwsem); +return err; }
Signature · 1 line
2.34.0