mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Runyu Xiao <runyu.xiao@seu.edu.cn>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	andy@kernel.org, dlechner@baylibre.com, lars@metafoo.de,
	Michael.Hennerich@analog.com, nuno.sa@analog.com
Subject: Re: [PATCH v2 0/2] iio: add IRQF_NO_THREAD to hardirq-only trigger helpers
Date: Sun, 14 Jun 2026 20:28:15 +0100	[thread overview]
Message-ID: <20260614202815.2a4df6b1@jic23-huawei> (raw)
In-Reply-To: <20260604014247.124724-1-runyu.xiao@seu.edu.cn>

On Thu,  4 Jun 2026 09:42:45 +0800
Runyu Xiao <runyu.xiao@seu.edu.cn> wrote:

> 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.
> 
> Changes in v2:
> - move build/runtime validation notes out of the per-patch commit
>   messages
> 
I forgot to say - there was something corrupted in the 1st patch so
I made the same edit by hand.  That is probably what stopped Sashiko
from looking at these.

Jonathan

> 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(-)
> 


      parent reply	other threads:[~2026-06-14 19:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04  1:42 Runyu Xiao
2026-06-04  1:42 ` [PATCH v2 1/2] iio: imu: adis: add IRQF_NO_THREAD to non-FIFO trigger IRQ Runyu Xiao
2026-06-04  1:42 ` [PATCH v2 2/2] iio: imu: bmi160: add IRQF_NO_THREAD to data-ready " Runyu Xiao
2026-06-14 19:26 ` [PATCH v2 0/2] iio: add IRQF_NO_THREAD to hardirq-only trigger helpers Jonathan Cameron
2026-06-14 19:28 ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260614202815.2a4df6b1@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=runyu.xiao@seu.edu.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®