Thread (44 messages) 44 messages, 3 authors, 2023-02-09

Re: [PATCH v4 06/19] irqdomain: Drop revmap mutex

From: Johan Hovold <johan@kernel.org>
Date: 2023-01-18 10:15:43
Also in: linux-mips, lkml, platform-driver-x86

On Tue, Jan 17, 2023 at 10:23:20PM +0100, Thomas Gleixner wrote:
On Mon, Jan 16 2023 at 14:50, Johan Hovold wrote:
quoted
The global irq_domain_mutex is now held in all paths that update the
revmap structures so there is no longer any need for the revmap mutex.
This can also go after the 3rd race fix, but ...
quoted
 static void irq_domain_clear_mapping(struct irq_domain *domain,
 				     irq_hw_number_t hwirq)
 {
+	lockdep_assert_held(&irq_domain_mutex);
these lockdep asserts want to be part of the [dis]association race
fixes. They are completely unrelated to the removal of the revmap_mutex.
No, they are very much related to the removal of the revmap_mutex. These
functions deal with the revmap structures which before this patch were
clearly only modified with the revmap_mutex held.

The lockdep assert is here to guarantee that my claim that all current
(and future) paths that end up modifying these structures do so under
the irq_domain_mutex instead.
Your race fixes change the locking and you want to ensure that all
callers comply right there, no?
I want to make sure that all callers of these function comply, yes.
That's why the asserts belong in this patch.

Johan

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help