From: Jonathan Cameron <jic23@kernel.org>
To: Maxwell Doose <m32285159@gmail.com>
Cc: "David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"open list:IIO SUBSYSTEM AND DRIVERS" <linux-iio@vger.kernel.org>,
"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5] iio: imu: kmx61: Use guard(mutex)() over manual locking
Date: Mon, 11 May 2026 18:17:49 +0100 [thread overview]
Message-ID: <20260511181749.32d64889@jic23-huawei> (raw)
In-Reply-To: <CAKqfh0ELaB7ifXNT3EkuC-K9s=V-mNgQ9WZt0ufVgmSD3xGQeQ@mail.gmail.com>
On Fri, 8 May 2026 08:03:45 -0500
Maxwell Doose <m32285159@gmail.com> wrote:
> Hi Jonathan,
>
> On Thu, May 7, 2026 at 5:33 PM Maxwell Doose <m32285159@gmail.com> wrote:
> >
> [snip]
> > @@ -945,29 +942,26 @@ static int kmx61_write_event_config(struct iio_dev *indio_dev,
> > if (state && data->ev_enable_state)
> > return 0;
> >
> > - mutex_lock(&data->lock);
> > + guard(mutex)(&data->lock);
> >
>
> Correct me if I'm wrong but this looks like a TOCTOU race, was
> reported by sashiko at
> https://sashiko.dev/#/patchset/20260507223337.48437-1-m32285159%40gmail.com.
> If this is a confirmed race I'll get a fix out this evening.
Indeed looks like a correct report.
Take your time though. I'm swamped anyway so will be a while before
I get to any new patches (probably!)
>
> best regards,
> max
next prev parent reply other threads:[~2026-05-11 17:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 22:33 [PATCH v5] iio: imu: kmx61: Use guard(mutex)() over manual locking Maxwell Doose
2026-05-08 13:03 ` Maxwell Doose
2026-05-11 17:17 ` Jonathan Cameron [this message]
2026-05-11 17:27 ` Maxwell Doose
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=20260511181749.32d64889@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m32285159@gmail.com \
--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