From: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
linux-iio@vger.kernel.org,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-kernel@vger.kernel.org,
"Lorenzo Bianconi" <lorenzo.bianconi83@gmail.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] iio: light: st_uvis25: notify the current trigger when done
Date: Mon, 9 Nov 2026 08:55:23 -0800 [thread overview]
Message-ID: <20261109085523.0000513e@oss.qualcomm.com> (raw)
In-Reply-To: <avGKjh7GOtE2tPGt@lore-desk>
On Mon, 9 Nov 2026 09:55:42 +0100
Lorenzo Bianconi <lorenzo@kernel.org> wrote:
> > From: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
> >
> > The trigger handler calls iio_trigger_notify_done() on the driver's own
> > trigger rather than on the trigger that is currently in use by the
> > device. The driver does not restrict which trigger may be used, so if
> > another trigger, for example an hrtimer trigger, is selected then that
> > trigger's use_count is never decremented and it stops firing after the
> > first sample. The driver's own trigger use_count also underflows,
> > preventing it from firing later.
> >
> > Use iio_dev->trig instead.
> >
> > Fixes: 3025c8688c1e ("iio: light: add support for UVIS25 sensor")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
>
> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Given content is all still here, rather than resend immediately to fix
the linux-iio mailing list address, I've just fixed it in this reply.
Thanks Lorenzo.
>
> > ---
> > Another LLM found one as part of refactoring how all the code around
> > triggers works. Definitely the wrong trigger. There are lots
> > that access the right trigger via the wrong path (shortly to be
> > cleaned up), this one manages to get the wrong one in many cases!
> > ---
> > drivers/iio/light/st_uvis25_core.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/light/st_uvis25_core.c b/drivers/iio/light/st_uvis25_core.c
> > index 94d5261b2663..5c63a68948d6 100644
> > --- a/drivers/iio/light/st_uvis25_core.c
> > +++ b/drivers/iio/light/st_uvis25_core.c
> > @@ -248,7 +248,7 @@ static irqreturn_t st_uvis25_buffer_handler_thread(int irq, void *p)
> > iio_get_time_ns(iio_dev));
> >
> > out:
> > - iio_trigger_notify_done(hw->trig);
> > + iio_trigger_notify_done(iio_dev->trig);
> >
> > return IRQ_HANDLED;
> > }
> > --
> > 2.56.0
> >
>
prev parent reply other threads:[~2026-11-09 16:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 2:54 Jonathan Cameron
2026-11-09 8:55 ` Lorenzo Bianconi
2026-11-09 16:55 ` 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=20261109085523.0000513e@oss.qualcomm.com \
--to=jonathan.cameron@oss.qualcomm.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=lorenzo@kernel.org \
--cc=nuno.sa@analog.com \
--cc=stable@vger.kernel.org \
/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®