linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: mru@users.sourceforge.net (Måns Rullgård)
Cc: linux-kernel@vger.kernel.org, alsa-devel@lists.sourceforge.net
Subject: Re: [Alsa-devel] ALSA timer and 2.6.0-test1 panic
Date: Thu, 17 Jul 2003 12:17:18 +0200	[thread overview]
Message-ID: <s5hlluxzccx.wl@alsa2.suse.de> (raw)
In-Reply-To: <yw1xlluyln01.fsf@users.sourceforge.net>

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

At Wed, 16 Jul 2003 13:38:54 +0200,
Måns Rullgård wrote:
> 
> 
> I get thousands of these messages when using the ALSA timer in kernel
> 2.6.0-test1:

there is an unblanced spinlock.
could you try the attached patch?

-- 
Takashi Iwai <tiwai@suse.de>		SuSE Linux AG - www.suse.de
ALSA Developer				ALSA Project - www.alsa-project.org

[-- Attachment #2: timer-spin-fix.dif --]
[-- Type: application/octet-stream, Size: 528 bytes --]

--- linux/sound/core/timer.c	18 Jun 2003 10:48:29 -0000	1.28
+++ linux/sound/core/timer.c	17 Jul 2003 10:15:11 -0000
@@ -1690,10 +1690,11 @@
 				break;
 			}
 		}
-		spin_unlock_irq(&tu->qlock);
 		if (err < 0)
 			break;
 
+		spin_unlock_irq(&tu->qlock);
+
 		if (tu->tread) {
 			if (copy_to_user(buffer, &tu->tqueue[tu->qhead++], sizeof(snd_timer_tread_t))) {
 				err = -EFAULT;
@@ -1714,6 +1715,7 @@
 		spin_lock_irq(&tu->qlock);
 		tu->qused--;
 	}
+	spin_unlock_irq(&tu->qlock);
 	return result > 0 ? result : err;
 }
 

  parent reply	other threads:[~2003-07-17 10:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-16 11:38 ALSA timer and 2.6.0-test1 panic Måns Rullgård
2003-07-16 12:16 ` Måns Rullgård
2003-07-17 10:17 ` Takashi Iwai [this message]
2003-07-17 12:06   ` Måns Rullgård

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=s5hlluxzccx.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mru@users.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).