All of lore.kernel.org
 help / color / mirror / Atom feed
From: Giuliano Pochini <pochini@shiny.it>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Fix divide by 0 in echoaudio driver
Date: Thu, 3 Jun 2010 23:43:10 +0200	[thread overview]
Message-ID: <20100603234310.5f87dc89@Jay> (raw)


This patch has already been merged in 2.6.34:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.34.y.git;a=commitdiff;h=b721e68bdc5b39c51bf6a1469f8d3663fbe03243

Since it fixes a /0 in the irq handler, please consider including it also
in the next maintenance release of 2.6.33.

This patch is against 2.6.33.5.


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

--- a/sound/pci/echoaudio/echoaudio.c	2010-06-03 22:23:21.000000000 +0100
+++ b/sound/pci/echoaudio/echoaudio.c	2010-06-03 22:48:33.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.

                 reply	other threads:[~2010-06-03 21:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20100603234310.5f87dc89@Jay \
    --to=pochini@shiny.it \
    --cc=linux-kernel@vger.kernel.org \
    /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.