Re: [PATCH v2 5/6] gpiolib: cdev: don't leak the IRQ name when the chip is removed
From: Adrian Ambrozewicz
Date: Tue Oct 20 2026 - 09:04:35 EST
On Fri, Oct 16, 2026 at 04:41:23PM +0300, Andy Shevchenko wrote:
> > struct line {
>
> > struct linereq *req;
> > unsigned int irq;
> > + char *irq_label;
>
> Have you checked this with `pahole`? Is it good layout?
Yes, on x86_64 (with gdb's ptype /o, which reads the same debug info
as pahole). struct line already had a 4-byte hole after irq, at offset
20. irq_label goes after that hole, at offset 24, so the struct grows
by the 8 bytes of the pointer and gets no new hole.
> > struct lineevent_state {
>
> > struct gpio_desc *desc;
> > u32 eflags;
> > int irq;
> > + char *irq_label;
>
> Ditto.
irq_label lands at offset 32, right after eflags and irq, so no hole
here either.
Adrian