From: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
To: <broonie@kernel.org>
Cc: <vkoul@kernel.org>, <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>,
<Vijendar.Mukunda@amd.com>, <linux-sound@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<sound-open-firmware@alsa-project.org>
Subject: [PATCH 0/4] ASoC: amd: fix IRQ handler races in AMD SoundWire drivers
Date: Sat, 7 Nov 2026 23:22:25 +0530 [thread overview]
Message-ID: <20261107175339.3547918-1-Vijendar.Mukunda@amd.com> (raw)
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.
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 reply other threads:[~2026-11-07 17:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 17:52 Vijendar Mukunda [this message]
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
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=20261107175339.3547918-1-Vijendar.Mukunda@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=vkoul@kernel.org \
--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®