]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: imu: adis: add IRQF_NO_THREAD to non-FIFO trigger IRQ
authorRunyu Xiao <runyu.xiao@seu.edu.cn>
Thu, 4 Jun 2026 01:42:46 +0000 (09:42 +0800)
committerJonathan Cameron <jic23@kernel.org>
Mon, 29 Jun 2026 22:24:46 +0000 (23:24 +0100)
devm_adis_probe_trigger() registers iio_trigger_generic_data_rdy_poll()
through devm_request_irq() on the non-FIFO path, but it does not add
IRQF_NO_THREAD to the IRQ flags.

When the kernel is booted with forced IRQ threading, the parent IRQ can
otherwise be threaded by the IRQ core and the subsequent IIO trigger
child IRQ is then dispatched from irq/... thread context instead of
hardirq context. Because iio_trigger_generic_data_rdy_poll()
immediately drives iio_trigger_poll(), this violates the hardirq-only
IIO trigger helper contract and can push downstream trigger consumers
through the wrong execution context.

Add IRQF_NO_THREAD on top of the existing adis->irq_flag value for the
non-FIFO request_irq() path, while preserving the current trigger
polarity and IRQF_NO_AUTOEN behavior.

Fixes: fec86c6b8369 ("iio: imu: adis: Add Managed device functions")
Cc: stable@vger.kernel.org
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/imu/adis_trigger.c

index d76e13cbac680331e3712a4e02ea96d2efe638f0..3e6a7af6ab017ed87a3ddc7829beeb9cf30f48fc 100644 (file)
@@ -94,7 +94,7 @@ int devm_adis_probe_trigger(struct adis *adis, struct iio_dev *indio_dev)
        else
                ret = devm_request_irq(&adis->spi->dev, adis->spi->irq,
                                       &iio_trigger_generic_data_rdy_poll,
-                                      adis->irq_flag,
+                                      adis->irq_flag | IRQF_NO_THREAD,
                                       indio_dev->name,
                                       adis->trig);
        if (ret)