All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: core: remove redundant spin_lock pair in snd_card_disconnect
@ 2021-03-29  3:36 root
  2021-03-29 11:26   ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: root @ 2021-03-29  3:36 UTC (permalink / raw)
  To: perex
  Cc: wang.yi59, alsa-devel, wang.liang82, tiwai, linux-kernel,
	Jia Zhou, xue.zhihong

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ALSA: core: remove redundant spin_lock pair in snd_card_disconnect
  2021-03-29  3:36 [PATCH] ALSA: core: remove redundant spin_lock pair in snd_card_disconnect root
@ 2021-03-29 11:26   ` Takashi Iwai
  0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2021-03-29 11:26 UTC (permalink / raw)
  To: root
  Cc: perex, tiwai, alsa-devel, linux-kernel, xue.zhihong,
	wang.liang82, Jia Zhou

On Mon, 29 Mar 2021 05:36:47 +0200,
root wrote:
> 
> [1.1.1  <text/plain; UTF-8 (base64)>]
> 
> 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>

The code change looks good, but the patch isn't cleanly applicable via
git-am.  Could you fix your MUA setup, or try to submit via
git-send-email?


thanks,

Takashi

> ---
>  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
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ALSA: core: remove redundant spin_lock pair in snd_card_disconnect
@ 2021-03-29 11:26   ` Takashi Iwai
  0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2021-03-29 11:26 UTC (permalink / raw)
  To: root; +Cc: alsa-devel, wang.liang82, linux-kernel, tiwai, Jia Zhou, xue.zhihong

On Mon, 29 Mar 2021 05:36:47 +0200,
root wrote:
> 
> [1.1.1  <text/plain; UTF-8 (base64)>]
> 
> 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>

The code change looks good, but the patch isn't cleanly applicable via
git-am.  Could you fix your MUA setup, or try to submit via
git-send-email?


thanks,

Takashi

> ---
>  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
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re:[PATCH] ALSA: core: remove redundant spin_lock pair in snd_card_disconnect
  2021-03-29 11:26   ` Takashi Iwai
  (?)
@ 2021-03-30  2:31   ` wang.yi59
  2021-03-30 11:20       ` Takashi Iwai
  -1 siblings, 1 reply; 6+ messages in thread
From: wang.yi59 @ 2021-03-30  2:31 UTC (permalink / raw)
  To: tiwai
  Cc: alsa-devel, wang.liang82, linux-kernel, tiwai, zhou.jia2, xue.zhihong

Hi Takashi,

Thanks a lot for your review!

> On Mon, 29 Mar 2021 05:36:47 +0200,
> root wrote:
> >
> > [1.1.1  <text/plain; UTF-8 (base64)>]
> >
> > 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>
>
> The code change looks good, but the patch isn't cleanly applicable via
> git-am.  Could you fix your MUA setup, or try to submit via
> git-send-email?

Apologise to the inconvenient of the format. This is a bug in the mail system of our
company's IT department, which confued us for a long time and will be resolved in
next month :(

Would you please do me a favor to accept this patch manually? Many thanks.

>
>
> thanks,
>
> Takashi
>
> > ---
> >  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
> >



---
Best wishes
Yi Wang

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ALSA: core: remove redundant spin_lock pair in snd_card_disconnect
  2021-03-30  2:31   ` wang.yi59
@ 2021-03-30 11:20       ` Takashi Iwai
  0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2021-03-30 11:20 UTC (permalink / raw)
  To: wang.yi59
  Cc: perex, tiwai, alsa-devel, linux-kernel, xue.zhihong,
	wang.liang82, zhou.jia2

On Tue, 30 Mar 2021 04:31:55 +0200,
<wang.yi59@zte.com.cn> wrote:
> 
> Hi Takashi,
> 
> Thanks a lot for your review!
> 
> > On Mon, 29 Mar 2021 05:36:47 +0200,
> > root wrote:
> > >
> > > [1.1.1  <text/plain; UTF-8 (base64)>]
> > >
> > > 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>
> >
> > The code change looks good, but the patch isn't cleanly applicable via
> > git-am.  Could you fix your MUA setup, or try to submit via
> > git-send-email?
> 
> Apologise to the inconvenient of the format. This is a bug in the mail system of our
> company's IT department, which confued us for a long time and will be resolved in
> next month :(
> 
> Would you please do me a favor to accept this patch manually? Many thanks.

OK, now applied manually.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ALSA: core: remove redundant spin_lock pair in snd_card_disconnect
@ 2021-03-30 11:20       ` Takashi Iwai
  0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2021-03-30 11:20 UTC (permalink / raw)
  To: wang.yi59
  Cc: alsa-devel, wang.liang82, linux-kernel, tiwai, zhou.jia2, xue.zhihong

On Tue, 30 Mar 2021 04:31:55 +0200,
<wang.yi59@zte.com.cn> wrote:
> 
> Hi Takashi,
> 
> Thanks a lot for your review!
> 
> > On Mon, 29 Mar 2021 05:36:47 +0200,
> > root wrote:
> > >
> > > [1.1.1  <text/plain; UTF-8 (base64)>]
> > >
> > > 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>
> >
> > The code change looks good, but the patch isn't cleanly applicable via
> > git-am.  Could you fix your MUA setup, or try to submit via
> > git-send-email?
> 
> Apologise to the inconvenient of the format. This is a bug in the mail system of our
> company's IT department, which confued us for a long time and will be resolved in
> next month :(
> 
> Would you please do me a favor to accept this patch manually? Many thanks.

OK, now applied manually.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-30 11:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29  3:36 [PATCH] ALSA: core: remove redundant spin_lock pair in snd_card_disconnect root
2021-03-29 11:26 ` 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

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.