linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Yu Zhao" <yuzhao@google.com>
Cc: "Mark Brown" <broonie@kernel.org>, <alsa-devel@alsa-project.org>,
	"Rakesh Ughreja" <rakesh.a.ughreja@intel.com>,
	"Vinod Koul" <vkoul@kernel.org>,
	"Jaroslav Kysela" <perex@perex.cz>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] sound: enable interrupt after dma buffer initialization
Date: Tue, 11 Sep 2018 08:06:49 +0200	[thread overview]
Message-ID: <s5hbm9436va.wl-tiwai@suse.de> (raw)
In-Reply-To: <20180910212150.202655-1-yuzhao@google.com>

On Mon, 10 Sep 2018 23:21:50 +0200,
Yu Zhao wrote:
> 
> In snd_hdac_bus_init_chip(), we enable interrupt before
> snd_hdac_bus_init_cmd_io() initializing dma buffers. If irq has
> been acquired and irq handler uses the dma buffer, kernel may crash
> when interrupt comes in.
> 
> Fix the problem by postponing enabling irq after dma buffer
> initialization. And warn once on null dma buffer pointer during the
> initialization.
> 
> Signed-off-by: Yu Zhao <yuzhao@google.com>

Looks good to me.

Reviewed-by: Takashi Iwai <tiwai@suse.de>


BTW, the reason why this hasn't been hit on the legacy HD-audio driver
is that we allocate usually with MSI, so the irq is isolated.

Any reason that Intel SKL driver doesn't use MST?


thanks,

Takashi

  parent reply	other threads:[~2018-09-11  6:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10 21:17 [PATCH 1/3] Revert "ASoC: Intel: Skylake: Acquire irq after RIRB allocation" Yu Zhao
2018-09-10 21:21 ` [PATCH 2/3] sound: enable interrupt after dma buffer initialization Yu Zhao
2018-09-10 21:23   ` [PATCH 3/3] sound: don't call skl_init_chip() to reset intel skl soc Yu Zhao
2018-09-11  6:17     ` Takashi Iwai
2018-09-11  6:06   ` Takashi Iwai [this message]
2018-09-11 20:58     ` [PATCH 2/3] sound: enable interrupt after dma buffer initialization Yu Zhao
2018-09-12  4:04       ` Vinod
2018-09-11  6:03 ` [PATCH 1/3] Revert "ASoC: Intel: Skylake: Acquire irq after RIRB allocation" Takashi Iwai
2018-09-11 16:36   ` Mark Brown
2018-09-11 20:44     ` Yu Zhao
2018-09-11 21:12 ` [PATCH v2 " Yu Zhao
2018-09-11 21:14   ` [PATCH v2 2/3] sound: enable interrupt after dma buffer initialization Yu Zhao
2018-09-11 21:15     ` [PATCH v2 3/3] sound: don't call skl_init_chip() to reset intel skl soc Yu Zhao
2018-09-12 10:20   ` [PATCH v2 1/3] Revert "ASoC: Intel: Skylake: Acquire irq after RIRB allocation" Mark Brown
2018-09-12 19:32     ` Yu Zhao
2018-09-13 11:31       ` Mark Brown
2018-09-12 19:43   ` [PATCH v3 1/3] ASoC: " Yu Zhao
2018-09-12 19:44     ` [PATCH v3 2/3] ASoC: enable interrupt after dma buffer initialization Yu Zhao
2018-09-12 19:45       ` [PATCH v3 3/3] ASoC: don't call skl_init_chip() to reset intel skl soc Yu Zhao
2018-09-13 11:31       ` [PATCH v3 2/3] ASoC: enable interrupt after dma buffer initialization Mark Brown

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=s5hbm9436va.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=rakesh.a.ughreja@intel.com \
    --cc=vkoul@kernel.org \
    --cc=yuzhao@google.com \
    /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).