mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
ALSA: core: remove redundant spin_lock pair in snd_card_disconnect
[ Upstream commitabc21649b3] modification in commit2a3f7221ac("ALSA: core: Fix card races between register and disconnect") resulting in this problem. Fixes:2a3f7221ac("ALSA: core: Fix card races between register and disconnect") Signed-off-by: Jia Zhou <zhou.jia2@zte.com.cn> Signed-off-by: Yi 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: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
afb3416c4f
commit
897c095c7e
|
|
@ -390,10 +390,8 @@ int snd_card_disconnect(struct snd_card *card)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
card->shutdown = 1;
|
card->shutdown = 1;
|
||||||
spin_unlock(&card->files_lock);
|
|
||||||
|
|
||||||
/* replace file->f_op with special dummy operations */
|
/* replace file->f_op with special dummy operations */
|
||||||
spin_lock(&card->files_lock);
|
|
||||||
list_for_each_entry(mfile, &card->files_list, list) {
|
list_for_each_entry(mfile, &card->files_list, list) {
|
||||||
/* it's critical part, use endless loop */
|
/* it's critical part, use endless loop */
|
||||||
/* we have no room to fail */
|
/* we have no room to fail */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user