lkml.org 
[lkml]   [2026]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2026-03-10 10:22    [W:0.155 / U:12.778 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog