diff mbox

lock-up when loading desktop

Message ID 543CC188.9050401@internode.on.net (mailing list archive)
State Superseded
Delegated to: Takashi Iwai
Headers show

Commit Message

Arthur Marsh Oct. 14, 2014, 6:24 a.m. UTC
Takashi Iwai wrote, on 14/10/14 07:44:

>>> had a similar lock-up (see second photo)
>>
>> I looked at the relevant code now, and this indeed seems like a
>> deadlock.  But it's nothing new, the code is a decade old.  I wonder
>> why it appears out of sudden.  Maybe the change of the spin lock path
>> triggers.
>>
>> The patch below is the fix, just removing the superfluous spinlock.

After applying *both*:

---

and the patch to pcm_native.c below:

>
> Also below is another thing I spotted now, but this is likely
> irrelevant from the lockup, supposedly.  In anyway, try this one
> together with the previous patch, too.
>
>
> Takashi
>
> ---
> diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
> index 85fe1a216225..bfe1cf6b492f 100644
> --- a/sound/core/pcm_native.c
> +++ b/sound/core/pcm_native.c
> @@ -818,7 +818,7 @@ static int snd_pcm_action_group(struct action_ops *ops,
>   		/* unlock streams */
>   		snd_pcm_group_for_each_entry(s1, substream) {
>   			if (s1 != substream) {
> -				if (s->pcm->nonatomic)
> +				if (s1->pcm->nonatomic)
>   					mutex_unlock(&s1->self_group.mutex);
>   				else
>   					spin_unlock(&s1->self_group.lock);
>

against current Linus git head,

I can run alsa-info.sh successfully and launch the desktop and play 
sounds generally (tested with MIDI and running aplay somefile.wav)

Thank you very much for the patches!

Regards,

Arthur.
diff mbox

Patch

diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 85fe1a216225..bfe1cf6b492f 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -818,7 +818,7 @@  static int snd_pcm_action_group(struct action_ops *ops,
  		/* unlock streams */
  		snd_pcm_group_for_each_entry(s1, substream) {
  			if (s1 != substream) {
-				if (s->pcm->nonatomic)
+				if (s1->pcm->nonatomic)
  					mutex_unlock(&s1->self_group.mutex);
  				else
  					spin_unlock(&s1->self_group.lock);