The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/2] iio: add IRQF_NO_THREAD to hardirq-only trigger helpers
@ 2026-06-02  9:17 Runyu Xiao
  2026-06-02  9:17 ` [PATCH 1/2] iio: imu: adis: add IRQF_NO_THREAD to non-FIFO trigger IRQ Runyu Xiao
  2026-06-02  9:17 ` [PATCH 2/2] iio: imu: bmi160: add IRQF_NO_THREAD to data-ready " Runyu Xiao
  0 siblings, 2 replies; 6+ messages in thread
From: Runyu Xiao @ 2026-06-02  9:17 UTC (permalink / raw)
  To: jic23
  Cc: nuno.sa, lars, Michael.Hennerich, dlechner, andy, benato.denis96,
	martin, linux-iio, linux-kernel, jianhao.xu, runyu.xiao

This series fixes two IIO trigger registration sites that pass
iio_trigger_generic_data_rdy_poll() to request_irq() without
IRQF_NO_THREAD.

Both sites are intended to drive iio_trigger_poll() from hardirq
context, but under forced IRQ threading they can otherwise run through
irq/... thread context instead.

This issue was first flagged by our static analysis tool while scanning
request_irq() sites that register iio_trigger_generic_data_rdy_poll(),
then manually audited on Linux v6.18.21.

It was further validated with a no-device QEMU selftest using irq_sim
to model a parent IRQ and a child IIO trigger IRQ under threadirqs. The
same trigger path ran from irq/... thread context without IRQF_NO_THREAD
and stayed in hardirq context after adding IRQF_NO_THREAD. The selftest
logged:

  3395 selftest: phase=bad current=irq/30-patchpar in_hardirq=0
  3395 selftest: phase=fixed current=swapper/0 in_hardirq=1
  3395 selftest: validation succeeded

Patch 1 fixes the ADIS non-FIFO managed trigger path.
Patch 2 fixes the BMI160 data-ready trigger path.

Build-tested by compiling adis_trigger.o and bmi160_core.o.

No ADIS or BMI160 hardware was available for end-to-end runtime testing
on this submission branch.

Runyu Xiao (2):
  iio: imu: adis: add IRQF_NO_THREAD to non-FIFO trigger IRQ
  iio: imu: bmi160: add IRQF_NO_THREAD to data-ready trigger IRQ

 drivers/iio/imu/adis_trigger.c       | 3 +--
 drivers/iio/imu/bmi160/bmi160_core.c | 3 ++-
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.34.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-06-03 13:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02  9:17 [PATCH 0/2] iio: add IRQF_NO_THREAD to hardirq-only trigger helpers Runyu Xiao
2026-06-02  9:17 ` [PATCH 1/2] iio: imu: adis: add IRQF_NO_THREAD to non-FIFO trigger IRQ Runyu Xiao
2026-06-03  1:05   ` Andy Shevchenko
2026-06-03 13:46     ` Jonathan Cameron
2026-06-02  9:17 ` [PATCH 2/2] iio: imu: bmi160: add IRQF_NO_THREAD to data-ready " Runyu Xiao
2026-06-03  1:06   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox