From: Jonathan Cameron <jic23@kernel.org>
To: David Lechner <dlechner@baylibre.com>
Cc: nuno.sa@analog.com, linux-iio@vger.kernel.org,
Andy Shevchenko <andy@kernel.org>
Subject: Re: [PATCH] iio: buffer: Fix wait_queue not being removed
Date: Sun, 22 Feb 2026 12:37:56 +0000 [thread overview]
Message-ID: <20260222123756.59273a33@jic23-huawei> (raw)
In-Reply-To: <6f5158e3-84e1-4159-9c61-789c2b198af2@baylibre.com>
On Sat, 21 Feb 2026 15:27:42 -0600
David Lechner <dlechner@baylibre.com> wrote:
> On 2/16/26 7:24 AM, Nuno Sá via B4 Relay wrote:
> > From: Nuno Sá <nuno.sa@analog.com>
> >
> > In the edge case where the IIO device is unregistered while we're
> > buffering, we were directly returning an error without removing the wait
> > queue. Instead, set 'ret' and break out of the loop.
> >
> > Fixes: 9eeee3b0bf19 ("iio: Add output buffer support")
> > Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> > ---
> Reviewed-by: David Lechner <dlechner@baylibre.com>
>
This brings the code inline with the near identical
flow in the read path.
It's been a while since I last looked at the locking / tear
down (what that ->info check is all about). I'll add actually
documenting all the corner cases to the todo list as IIRC
there are some non obvious ordering constraints. IIRC,
in the buffer paths, it is fairly straight forward
as it's just an optimization to avoid queuing or draining
data when the device is going down - nothing about the buffers
themselves involves interacting directly with the hardware.
Applied to the fixes-togreg branch of iio.git and marked
for stable.
Thanks,
Jonathan
next prev parent reply other threads:[~2026-02-22 12:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-16 13:24 [PATCH] iio: buffer: Fix wait_queue not being removed Nuno Sá via B4 Relay
2026-02-21 21:27 ` David Lechner
2026-02-22 12:37 ` Jonathan Cameron [this message]
2026-02-23 13:39 ` Nuno Sá
2026-02-23 15:05 ` Andy Shevchenko
2026-02-23 17:08 ` Nuno Sá
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=20260222123756.59273a33@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
/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