mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frederick V Heitkamp <heitkamp@ameritech.net>
To: Giuliano Pochini <pochini@shiny.it>,
	Clemens Ladisch <clemens@ladisch.de>
Cc: Takashi Iwai <tiwai@suse.de>,
	linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] Crash 2.6.32.x, Echo 3G, Alsa, SCSI
Date: Tue, 2 Feb 2010 18:53:54 -0800 (PST)	[thread overview]
Message-ID: <629563.51563.qm@web180707.mail.sp1.yahoo.com> (raw)
In-Reply-To: <20100202230911.71e8b600@Jay>


There is another possible fix. I tested it briefly. It looks ok wrt race
conditions because pipe->state is set only in the trigger callback. I hope
I didn't overlook anything again...


Signed-off-by: Giuliano Pochini <pochini@shiny.it>

--- alsa-driver-1.0.22.1/alsa-kernel/pci/echoaudio/echoaudio.c__orig    2010-02-02 22:37:33.000000000 +0100
+++ alsa-driver-1.0.22.1/alsa-kernel/pci/echoaudio/echoaudio.c    2010-02-02 22:44:03.000000000 +0100
@@ -1821,7 +1821,9 @@ static irqreturn_t snd_echo_interrupt(in
    /* The hardware doesn't tell us which substream caused the irq,
    thus we have to check all running substreams. */
    for (ss = 0; ss < DSP_MAXPIPES; ss++) {
-        if ((substream = chip->substream[ss])) {
+        substream = chip->substream[ss];
+        if (substream && ((struct audiopipe *)substream->runtime->
+                private_data)->state == PIPE_STATE_STARTED) {
            period = pcm_pointer(substream) /
                substream->runtime->period_size;
            if (period != chip->last_period[ss]) {


-- 
Giuliano.


I am using this patch.  So far, no crash.


Fred

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



  reply	other threads:[~2010-02-03  2:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-02 14:21 Frederick V Heitkamp
2010-02-02 15:30 ` [alsa-devel] " Clemens Ladisch
2010-02-02 16:02   ` Giuliano Pochini
2010-02-02 22:09   ` Giuliano Pochini
2010-02-03  2:53     ` Frederick V Heitkamp [this message]
2010-05-31 19:05     ` F. Heitkamp
2010-05-31 20:59       ` Giuliano Pochini
2010-06-01  5:37         ` Takashi Iwai
2010-06-01 12:25         ` [Alsa-user] " F. Heitkamp
2010-06-02 22:08           ` Giuliano Pochini
2010-06-17 12:11             ` F. Heitkamp
2010-06-18 11:55               ` Giuliano Pochini

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=629563.51563.qm@web180707.mail.sp1.yahoo.com \
    --to=heitkamp@ameritech.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pochini@shiny.it \
    --cc=tiwai@suse.de \
    /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

all inboxes | Powered by JetHome®