Messages in this thread |  | | From | Bartosz Golaszewski <> | | Date | Tue, 10 Mar 2026 10:14:59 +0100 | | Subject | Re: [PATCH v3 4/7] gpio: gpiolib: fix allocation order in hierarchical IRQ domains |
| |
On Tue, Mar 10, 2026 at 10:05 AM Linus Walleij <linusw@kernel.org> wrote: > > On Mon, Mar 9, 2026 at 2:49 PM Oleksij Rempel <o.rempel@pengutronix.de> wrote: > > > In gpiochip_hierarchy_irq_domain_alloc(), calling irq_domain_set_info() > > before irq_domain_alloc_irqs_parent() causes a NULL pointer dereference > > for slow-bus (SPI/I2C) IRQ chips. > > > > irq_domain_set_info() locks the child descriptor, triggering .irq_bus_lock. > > If the child proxies this lock to the parent, it crashes because > > parent->chip is not yet allocated. > > > > Fix this by allocating the parent IRQs first, ensuring parent->chip is > > populated before the child's .irq_bus_lock is invoked. > > > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> > > --- > > changes v3 > > - new patch > > Bartosz, tglx: is this something we should apply for fixes? > > I think it needs to go into gpiolib for next at minimum, unless > there is some semantic problem with the patch. >
Looks good to me. I can take it into v7.0-rc4 via the GPIO tree and tglx can pull the tag once it's out as a base for the rest of the series?
Bart
|  |