* [PATCH] soundwire: irq: Invalidate slave->irq before disposing the mapping
@ 2026-08-31 11:57 Richard Fitzgerald
2026-08-31 13:07 ` Richard Fitzgerald
0 siblings, 1 reply; 2+ messages in thread
From: Richard Fitzgerald @ 2026-08-31 11:57 UTC (permalink / raw)
To: vkoul; +Cc: linux-sound, linux-kernel, patches
In sdw_irq_dispose_mapping() invalidate the value in slave->irq before
calling irq_dispose_mapping().
This fixes the potential problem with the original code that slave->irq
was left with the value of the disposed mapping, so it looked like it
was still a valid IRQ.
Fixes: a5fef9baa87f ("soundwire: bus: Move irq mapping cleanup into devres")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
drivers/soundwire/irq.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/soundwire/irq.c b/drivers/soundwire/irq.c
index f18be37efef8e..f0de5a5e5eb43 100644
--- a/drivers/soundwire/irq.c
+++ b/drivers/soundwire/irq.c
@@ -49,8 +49,12 @@ void sdw_irq_delete(struct sdw_bus *bus)
static void sdw_irq_dispose_mapping(void *data)
{
struct sdw_slave *slave = data;
+ int irq = slave->irq;
- irq_dispose_mapping(slave->irq);
+ slave->irq = 0;
+
+ if (irq)
+ irq_dispose_mapping(irq);
}
void sdw_irq_create_mapping(struct sdw_slave *slave)
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] soundwire: irq: Invalidate slave->irq before disposing the mapping
2026-08-31 11:57 [PATCH] soundwire: irq: Invalidate slave->irq before disposing the mapping Richard Fitzgerald
@ 2026-08-31 13:07 ` Richard Fitzgerald
0 siblings, 0 replies; 2+ messages in thread
From: Richard Fitzgerald @ 2026-08-31 13:07 UTC (permalink / raw)
To: vkoul; +Cc: linux-sound, linux-kernel, patches
On 31/08/2026 12:57 pm, Richard Fitzgerald wrote:
> In sdw_irq_dispose_mapping() invalidate the value in slave->irq before
> calling irq_dispose_mapping().
>
> This fixes the potential problem with the original code that slave->irq
> was left with the value of the disposed mapping, so it looked like it
> was still a valid IRQ.
Actually, ignore this patch.
There are more problems with the validity of slave->irq and this isn't
really tackling it fully.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-31 13:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-31 11:57 [PATCH] soundwire: irq: Invalidate slave->irq before disposing the mapping Richard Fitzgerald
2026-08-31 13:07 ` Richard Fitzgerald
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®