Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: David Lechner <dlechner@baylibre.com>
Cc: "Sean Nyekjaer" <sean@geanix.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] iio: accel: fxls8962af: Fix use after free in fxls8962af_fifo_flush
Date: Fri, 30 May 2025 20:51:44 +0300	[thread overview]
Message-ID: <aDnwMDGDf3-KUb3J@smile.fi.intel.com> (raw)
In-Reply-To: <67c33f11-0196-44f4-9cdd-762618cb88be@baylibre.com>

On Thu, May 29, 2025 at 01:49:16PM -0500, David Lechner wrote:
> On 5/29/25 1:16 PM, Andy Shevchenko wrote:
> > On Thu, May 29, 2025 at 7:02 PM David Lechner <dlechner@baylibre.com> wrote:
> >> On 5/24/25 5:34 AM, Sean Nyekjaer wrote:

...

> >> fxls8962af_suspend() calls enable_irq_wake(data->irq); before disabling the
> >> interrupt by calling fxls8962af_buffer_predisable(indio_dev);
> >>
> >> It seems like the order should be reversed.
> > 
> > AFAIU the wake capability of IRQ line is orthogonal to the interrupt
> > controller enabling (unmasking) / disabling (masking) the line itself.
> > Or did you mean something else?
> 
> I don't know enough about how suspend/wake stuff works to say for sure.
> 
> I just saw the comment:
> 
> 	/*
> 	 * Disable buffer, as the buffer is so small the device will wake
> 	 * almost immediately.
> 	 */
> 
> so I assumed someone had observed something like this happening already.
> If an interrupt occurs between enable_irq_wake() and actually
> going into a low power mode, what effect does it have? I ask because I
> don't know.

To be a "wake source" means to be capable of signaling to the system that wake
is needed. If an event comes after enabling an IRQ line to be a wake source,
that should wakeup the system (independently if that IRQ line is disabled or
not on the IRQ controller side).

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-05-30 17:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-24 10:34 [PATCH] iio: accel: fxls8962af: Fix use after free in fxls8962af_fifo_flush Sean Nyekjaer
2025-05-29 16:02 ` David Lechner
2025-05-29 18:16   ` Andy Shevchenko
2025-05-29 18:49     ` David Lechner
2025-05-30 17:51       ` Andy Shevchenko [this message]
2025-05-30 17:57         ` David Lechner
2025-05-30 19:51           ` Andy Shevchenko
2025-05-31 16:53 ` Jonathan Cameron
2025-06-02 10:50   ` Sean Nyekjaer
2025-06-02 15:00     ` David Lechner

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=aDnwMDGDf3-KUb3J@smile.fi.intel.com \
    --to=andy.shevchenko@gmail.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=sean@geanix.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