From: David Lechner <dlechner@baylibre.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Dumitru Ceclan" <mitrutzceclan@gmail.com>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Nuno Sa" <nuno.sa@analog.com>,
"Michael Walle" <michael@walle.cc>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Guillaume Ranquet" <granquet@baylibre.com>
Subject: Re: [PATCH v2 0/3] iio: adc: ad7173: fix non-const info struct
Date: Sat, 30 Nov 2024 12:50:39 -0600 [thread overview]
Message-ID: <2c6a435e-23aa-446c-bec6-6fc4d24e2d66@baylibre.com> (raw)
In-Reply-To: <20241130184306.51e5bb8c@jic23-huawei>
On 11/30/24 12:43 PM, Jonathan Cameron wrote:
> On Wed, 27 Nov 2024 14:01:52 -0600
> David Lechner <dlechner@baylibre.com> wrote:
>
>> While working ad7124, Uwe pointed out a bug in the ad7173 driver.
>> static struct ad_sigma_delta_info ad7173_sigma_delta_info was not const
>> and was being modified during driver probe, which could lead to race
>> conditions if two instances of the driver were probed at the same time.
>>
>> The actual fix part is fairly trivial but I have only compile tested it.
>> Guillaume has access to ad4111 hardware, so it would be good to get a
>> Tested-by from him to make sure this doesn't break anything.
>>
> This is very big for a backport. So I replied to previous version to suggest
> instead duplicating the data before modifying. That has much less code
> movement and maybe a cleaner fix. Perhaps we then cycle back to avoiding
> that copy later.
>
That is exactly what I did in v2. "iio: adc: ad7173: fix using shared
static info struct" copies the struct before modifying it and is the
only patch with a Fixes: tag.
next prev parent reply other threads:[~2024-11-30 18:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-27 20:01 [PATCH v2 0/3] iio: adc: ad7173: fix non-const info struct David Lechner
2024-11-27 20:01 ` [PATCH v2 1/3] iio: adc: ad7173: fix using shared static " David Lechner
2024-11-27 20:01 ` [PATCH v2 2/3] iio: adc: ad7173: remove special handling for irq number David Lechner
2024-11-28 6:47 ` Andy Shevchenko
2024-11-29 14:53 ` David Lechner
2024-11-27 20:01 ` [PATCH v2 3/3] iio: adc: ad7173: don't make copy of ad_sigma_delta_info struct David Lechner
2024-11-28 6:40 ` Andy Shevchenko
2024-11-28 10:42 ` [PATCH v2 0/3] iio: adc: ad7173: fix non-const info struct Guillaume Ranquet
2024-11-30 18:43 ` Jonathan Cameron
2024-11-30 18:50 ` David Lechner [this message]
2024-12-01 13:33 ` Jonathan Cameron
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=2c6a435e-23aa-446c-bec6-6fc4d24e2d66@baylibre.com \
--to=dlechner@baylibre.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=granquet@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@walle.cc \
--cc=mitrutzceclan@gmail.com \
--cc=nuno.sa@analog.com \
--cc=u.kleine-koenig@baylibre.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