All of lore.kernel.org
 help / color / mirror / Atom feed
From: root <wang.yi59@zte.com.cn>
To: perex@perex.cz
Cc: wang.yi59@zte.com.cn, alsa-devel@alsa-project.org,
	wang.liang82@zte.com.cn, tiwai@suse.com,
	linux-kernel@vger.kernel.org, Jia Zhou <zhou.jia2@zte.com.cn>,
	xue.zhihong@zte.com.cn
Subject: [PATCH] ALSA: core: remove redundant spin_lock pair in snd_card_disconnect
Date: Mon, 29 Mar 2021 11:36:47 +0800	[thread overview]
Message-ID: <1616989007-34429-1-git-send-email-wang.yi59@zte.com.cn> (raw)

From: Jia Zhou <zhou.jia2@zte.com.cn>

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

Signed-off-by: Jia Zhou <zhou.jia2@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
---
 sound/core/init.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sound/core/init.c b/sound/core/init.c
index 018ce4ef1..9f5270c90 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -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 */
-- 
2.18.4

             reply	other threads:[~2021-03-29  3:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29  3:36 root [this message]
2021-03-29 11:26 ` [PATCH] ALSA: core: remove redundant spin_lock pair in snd_card_disconnect Takashi Iwai
2021-03-29 11:26   ` Takashi Iwai
2021-03-30  2:31   ` wang.yi59
2021-03-30 11:20     ` [PATCH] " Takashi Iwai
2021-03-30 11:20       ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1616989007-34429-1-git-send-email-wang.yi59@zte.com.cn \
    --to=wang.yi59@zte.com.cn \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=wang.liang82@zte.com.cn \
    --cc=xue.zhihong@zte.com.cn \
    --cc=zhou.jia2@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.