All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Crofts <joshua.crofts1@gmail.com>
To: Karl Mehltretter <kmehltretter@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Leonard Crestez" <cdleonard@gmail.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] iio: trigger: Return an error when the trigger has no free irq
Date: Tue, 6 Oct 2026 08:43:52 +0200	[thread overview]
Message-ID: <20261006084352.00006689@gmail.com> (raw)
In-Reply-To: <20261006034147.2370-1-kmehltretter@gmail.com>

On Tue,  6 Oct 2026 05:41:47 +0200
Karl Mehltretter <kmehltretter@gmail.com> wrote:

> iio_trigger_attach_poll_func() prints an error when all
> CONFIG_IIO_CONSUMERS_PER_TRIGGER irqs of the trigger are in use, but
> returns 0. The buffer of the extra consumer is enabled without a poll
> function.
> 
> Disabling that buffer calls clear_bit() with a negative bit number and
> drops a module reference for the second time. On arm and arm64 the
> clear_bit() goes about 512 MB past the pool bitmap. That is an oops if
> the address is not mapped, and a bit cleared in unrelated memory if it
> is.
> 
> Return the error from iio_trigger_get_irq().
> 
> Fixes: 995438233579 ("iio: Fix error handling in iio_trigger_attach_poll_func")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
> ---

A 10 year old bug. Nice find!

Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>

-- 
Kind regards,
Joshua Crofts

      reply	other threads:[~2026-10-06  6:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-06  3:41 [PATCH] iio: trigger: Return an error when the trigger has no free irq Karl Mehltretter
2026-10-06  6:43 ` Joshua Crofts [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=20261006084352.00006689@gmail.com \
    --to=joshua.crofts1@gmail.com \
    --cc=andy@kernel.org \
    --cc=cdleonard@gmail.com \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=kmehltretter@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.