linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yu Zhao <yuzhao@google.com>
To: Takashi Iwai <tiwai@suse.de>, Vinod Koul <vkoul@kernel.org>
Cc: Mark Brown <broonie@kernel.org>,
	alsa-devel@alsa-project.org,
	Rakesh Ughreja <rakesh.a.ughreja@intel.com>,
	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 14:58:25 -0600	[thread overview]
Message-ID: <20180911205825.GB18086@google.com> (raw)
In-Reply-To: <s5hbm9436va.wl-tiwai@suse.de>

On Tue, Sep 11, 2018 at 08:06:49AM +0200, Takashi Iwai wrote:
> 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?

This I'm not sure. Vinod might have answer to it, according to
https://patchwork.kernel.org/patch/6375831/#13796611

  reply	other threads:[~2018-09-11 20:58 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   ` [PATCH 2/3] sound: enable interrupt after dma buffer initialization Takashi Iwai
2018-09-11 20:58     ` Yu Zhao [this message]
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=20180911205825.GB18086@google.com \
    --to=yuzhao@google.com \
    --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=tiwai@suse.de \
    --cc=vkoul@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 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).