Re: [PATCH] iio: buffer: only set IRQF_ONESHOT when thread handler is provided

From: Jonathan Cameron

Date: Fri May 15 2026 - 10:22:48 EST


On Fri, 15 May 2026 13:46:30 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:

> On Fri, May 15, 2026 at 12:46:00AM +0200, Дамјан Гео ргиевски wrote:
> > iio_triggered_buffer_setup_ext() unconditionally passes IRQF_ONESHOT to
> > iio_alloc_pollfunc(), even when the caller provides no thread function.
> > This causes a warning in __setup_irq() when the trigger is later
> > attached:
> >
> > WARNING: kernel/irq/manage.c:1502 at __setup_irq+0x4ee/0x700
> >
> > IRQF_ONESHOT keeps the IRQ masked until the threaded handler completes,
> > but with no threaded handler this is semantically wrong. Only set the
> > flag when a thread function is actually provided.
>
> Yes, please read the mailing list archive and find the previous attempt to fix
> this and the associated discussions.
>


Just to check - what is the driver in use? The fixes so far all belong in the
drivers, not papering over it in the core (note this is maybe the 3rd time
this same patch has been posted and rejected!)

Jonathan