From: Dan Carpenter <error27@gmail.com>
To: Joshua Crofts <joshua.crofts1@gmail.com>
Cc: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
gregkh@linuxfoundation.org, dlechner@baylibre.com,
nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] iio: frequency: ad9834: add mutex_lock() when reading st->control
Date: Tue, 14 Apr 2026 12:36:02 +0300 [thread overview]
Message-ID: <ad4KgkcR58lQwPaD@stanley.mountain> (raw)
In-Reply-To: <20260414091250.1295-4-joshua.crofts1@gmail.com>
On Tue, Apr 14, 2026 at 09:12:50AM +0000, Joshua Crofts wrote:
> Add mutex_lock() and mutex_unlock() when reading st->control to
> prevent data races as st->control is actively modified by
> sysfs _write and _store functions.
>
> Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
> ---
This doesn't matter in real life. "Oops, the root user tried
really hard to do something stupid and got "square" as the output
a fraction of a milisecond longer than they were supposed to."
Is there a tool which detects and complains about this?
regards,
dan carpenter
next prev parent reply other threads:[~2026-04-14 9:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 9:12 [PATCH 0/3] iio: frequency: ad9834: driver cleanup Joshua Crofts
2026-04-14 9:12 ` [PATCH 1/3] iio: frequency: ad9834: clean up includes Joshua Crofts
2026-04-14 9:47 ` Andy Shevchenko
2026-04-14 9:12 ` [PATCH 2/3] iio: frequency: ad9834: change sprintf() to sysfs_emit() Joshua Crofts
2026-04-14 9:29 ` Dan Carpenter
2026-04-14 9:12 ` [PATCH 3/3] iio: frequency: ad9834: add mutex_lock() when reading st->control Joshua Crofts
2026-04-14 9:36 ` Dan Carpenter [this message]
2026-04-14 9:44 ` Joshua Crofts
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=ad4KgkcR58lQwPaD@stanley.mountain \
--to=error27@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=joshua.crofts1@gmail.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--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