From: Jonathan Cameron <jic23@kernel.org>
To: Dan Carpenter <error27@gmail.com>
Cc: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>,
gregkh@linuxfoundation.org, nuno.sa@analog.com,
Michael.Hennerich@analog.com, dlechner@baylibre.com,
andy@kernel.org, linux@analog.com, linux-iio@vger.kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
joshua.crofts1@gmail.com
Subject: Re: [PATCH] staging: iio: adc: ad7816: Protect sysfs attributes with mutex
Date: Sun, 20 Sep 2026 02:05:27 +0100 [thread overview]
Message-ID: <20260920020527.2628cb3f@jic23-hlaptop> (raw)
In-Reply-To: <aq5nnHPp-tg3C6k0@stanley.mountain>
On Sat, 19 Sep 2026 13:44:44 +0300
Dan Carpenter <error27@gmail.com> wrote:
> On Sat, Sep 19, 2026 at 11:55:13AM +0300, Abdelnasser Hussein wrote:
> > The sysfs store functions (ad7816_store_mode and ad7816_store_channel)
> > modify the device state and toggle GPIO pins. If accessed concurrently
> > by userspace during an ongoing SPI transfer, this could corrupt the
> > SPI transaction.
> >
> > Add the existing chip->lock guard to these functions to serialize
> > access and prevent race conditions.
> >
> > Suggested-by: Joshua Crofts <joshua.crofts1@gmail.com>
> > Signed-off-by: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
>
> Add a Fixes tag.
Hmm - this is a follow up for a few missed cases. The original patch
should probably have had a fixes tag as well even though it's in staging
and the bug goes back probably a decade or more. Ah well, Abdelnasser,
add one here anyway and send a v2 with the spacing Joshua asked for.
Thanks,
Jonathan
>
> regards,
> dan carpenter
>
prev parent reply other threads:[~2026-09-20 1:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-19 8:55 Abdelnasser Hussein
2026-09-19 9:31 ` Joshua Crofts
2026-09-19 10:44 ` Dan Carpenter
2026-09-20 1:05 ` Jonathan Cameron [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=20260920020527.2628cb3f@jic23-hlaptop \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=abdelnasserhussein11@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=joshua.crofts1@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux@analog.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
all inboxes | Powered by JetHome®