[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250521142541.3832130-1-claudiu.beznea.uj@bp.renesas.com>
Date: Wed, 21 May 2025 17:25:41 +0300
From: Claudiu <claudiu.beznea@...on.dev>
To: tglx@...utronix.de,
peterz@...radead.org,
jirislaby@...nel.org
Cc: claudiu.beznea@...on.dev,
linux-kernel@...r.kernel.org,
Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
Subject: [PATCH] genirq/irqdesc: Fix deadlock when reading hwirq
From: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
The &desc->lock is acquired on 2 consecutive lines in hwirq_show(). This
leads to deadlock when reading hwirq. Drop the raw_spin_lock_irq() and
keep guard().
Fixes: 5d964a9f7cd8 ("genirq/irqdesc: Switch to lock guards")
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
---
kernel/irq/irqdesc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 6d006a68ff85..b64c57b44c20 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -281,7 +281,6 @@ static ssize_t hwirq_show(struct kobject *kobj, struct kobj_attribute *attr, cha
struct irq_desc *desc = container_of(kobj, struct irq_desc, kobj);
guard(raw_spinlock_irq)(&desc->lock);
- raw_spin_lock_irq(&desc->lock);
if (desc->irq_data.domain)
return sysfs_emit(buf, "%lu\n", desc->irq_data.hwirq);
return 0;
--
2.43.0
Powered by blists - more mailing lists