From: "Mukunda,Vijendar" <vijendar.mukunda@amd.com>
To: broonie@kernel.org, vinod.koul@intel.com
Cc: alsa-devel@alsa-project.org, lgirdwood@gmail.com, perex@perex.cz,
tiwai@suse.com, yung-chuan.liao@linux.intel.com,
Basavaraj.Hiregoudar@amd.com, Sunil-kumar.Dommati@amd.com,
venkataprasad.potturu@amd.com, Syed.SabaKareem@amd.com,
Mario.Limonciello@amd.com, Richard.Gong@amd.com,
Poojitha.N@amd.com, lee@kernel.org, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org,
sound-open-firmware@alsa-project.org
Subject: Re: [PATCH 0/4] ASoC: amd: fix IRQ handler races in AMD SoundWire drivers
Date: Sun, 8 Nov 2026 01:09:02 +0530 [thread overview]
Message-ID: <f2f294f0-55bd-482f-9b47-fdc9f506fe53@amd.com> (raw)
In-Reply-To: <20261107175339.3547918-1-Vijendar.Mukunda@amd.com>
On 07/11/26 23:22, Vijendar Mukunda wrote:
> These four patches fix two related race conditions in the AMD SoundWire
> IRQ handlers for the PS (ACP63) and SOF platforms.
>
> Patches 1 and 2 guard against a NULL dereference in the ACP external IRQ
> handler. The handler is registered before sdw_amd_probe() assigns
> adata->sdw, so a stray interrupt in the probe window, or one that fires
> after sdw_amd_exit() frees the context, can reach the adata->sdw->pdev[i]
> dereference with adata->sdw still NULL.
>
> Patches 3 and 4 guard schedule_work() calls with the interrupt_enabled
> flag so that an in-flight IRQ arriving while the SoundWire manager is
> being torn down does not queue new work after amd_disable_sdw_interrupts()
> has cleared the flag.
>
> NOTE: Patches 3 and 4 depend on the following patch which introduces the
> interrupt_enabled field in the AMD SoundWire manager:
>
> https://lore.kernel.org/linux-sound/20261107154659.3358223-18-Vijendar.Mukunda@amd.com/
>
> Until that patch is merged, patches 3 and 4 should not be picked up
> independently.
Hi Mark, Vinod,
The following two series have a build and correctness dependency on
each other:
SoundWire fix series (25 patches):
https://lore.kernel.org/linux-sound/20261107154659.3358223-1-Vijendar.Mukunda@amd.com/
Companion ASoC series (4 patches):
https://lore.kernel.org/alsa-devel/20261107175339.3547918-2-Vijendar.Mukunda@amd.com/
ASoC patches 1/4 and 2/4 reference the interrupt_enabled member of
struct amd_sdw_manager introduced by SoundWire patch 17/25, so the
ASoC patches will not build without the SoundWire series. SoundWire
patch 18/25 delays *sdw_ctx publication until after startup succeeds,
opening a probe-window race in acp63_irq_handler() and
acp_irq_handler() that ASoC patches 3/4 and 4/4 close with adata->sdw
NULL checks.
Because the two series are split across trees, the Sashiko AI review
tool sees each series in isolation and raises the cross-tree dependency
as unresolved races:
https://sashiko.dev/#/patchset/20261107154659.3358223-1-Vijendar.Mukunda%40amd.com
https://sashiko.dev/#/patchset/20261107175339.3547918-1-Vijendar.Mukunda%40amd.com
When both series were combined and run through Sashiko as a single
patch set, none of these cross-dependency issues were reported,
confirming that the concerns are an artifact of the split rather than
real bugs. Reposting as a single combined series would give Sashiko
the full context and make the review cycle easier. Please let us know
if that is the preferred approach.
Thanks,
Vijendar
> Vijendar Mukunda (4):
> ASoC: amd: ps: guard adata->sdw dereferences with NULL check in IRQ
> handler
> ASoC: SOF: amd: guard adata->sdw dereferences with NULL check in IRQ
> handler
> ASoC: SOF: amd: guard SDW IRQ work scheduling with interrupt_enabled
> flag
> ASoC: amd: ps: guard SDW IRQ work scheduling with interrupt_enabled
> flag
>
> sound/soc/amd/ps/pci-ps.c | 32 ++++++++++++++++++++------------
> sound/soc/sof/amd/acp.c | 32 ++++++++++++++++++++------------
> 2 files changed, 40 insertions(+), 24 deletions(-)
>
> --
> 2.53.0
next prev parent reply other threads:[~2026-11-07 19:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 17:52 Vijendar Mukunda
2026-11-07 17:52 ` [PATCH 1/4] ASoC: amd: ps: guard adata->sdw dereferences with NULL check in IRQ handler Vijendar Mukunda
2026-11-07 17:52 ` [PATCH 2/4] ASoC: SOF: amd: " Vijendar Mukunda
2026-11-07 17:52 ` [PATCH 3/4] ASoC: SOF: amd: guard SDW IRQ work scheduling with interrupt_enabled flag Vijendar Mukunda
2026-11-07 17:52 ` [PATCH 4/4] ASoC: amd: ps: " Vijendar Mukunda
2026-11-07 19:39 ` Mukunda,Vijendar [this message]
2026-11-07 19:46 ` [PATCH 0/4] ASoC: amd: fix IRQ handler races in AMD SoundWire drivers Mukunda,Vijendar
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=f2f294f0-55bd-482f-9b47-fdc9f506fe53@amd.com \
--to=vijendar.mukunda@amd.com \
--cc=Basavaraj.Hiregoudar@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Poojitha.N@amd.com \
--cc=Richard.Gong@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=Syed.SabaKareem@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=sound-open-firmware@alsa-project.org \
--cc=tiwai@suse.com \
--cc=venkataprasad.potturu@amd.com \
--cc=vinod.koul@intel.com \
--cc=yung-chuan.liao@linux.intel.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
all inboxes | Powered by JetHome®