Skip to content
Snippets Groups Projects
Commit 897c095c authored by Jia Zhou's avatar Jia Zhou Committed by Greg Kroah-Hartman
Browse files

ALSA: core: remove redundant spin_lock pair in snd_card_disconnect


[ Upstream commit abc21649 ]

modification in commit 2a3f7221 ("ALSA: core: Fix card races between
register and disconnect") resulting in this problem.

Fixes: 2a3f7221 ("ALSA: core: Fix card races between register and disconnect")
Signed-off-by: default avatarJia Zhou <zhou.jia2@zte.com.cn>
Signed-off-by: default avatarYi Wang <wang.yi59@zte.com.cn>
Link: https://lore.kernel.org/r/1616989007-34429-1-git-send-email-wang.yi59@zte.com.cn


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent afb3416c
No related branches found
No related tags found
No related merge requests found
......@@ -390,10 +390,8 @@ int snd_card_disconnect(struct snd_card *card)
return 0;
}
card->shutdown = 1;
spin_unlock(&card->files_lock);
/* replace file->f_op with special dummy operations */
spin_lock(&card->files_lock);
list_for_each_entry(mfile, &card->files_list, list) {
/* it's critical part, use endless loop */
/* we have no room to fail */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment