summaryrefslogtreecommitdiff
path: root/scripts/generate_rust_analyzer.py
diff options
context:
space:
mode:
authorDavid Lechner <dlechner@baylibre.com>2024-11-27 23:01:53 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-01-17 15:40:58 +0300
commit24b89b747b1c0452bcd4d6aea6a9698b28cc1bd6 (patch)
treeb0d56ee3deaf366ffdad34c4b1458a68878e37d3 /scripts/generate_rust_analyzer.py
parentb44c99621ddb05507ce2b6e1795489ddec46e369 (diff)
downloadlinux-24b89b747b1c0452bcd4d6aea6a9698b28cc1bd6.tar.xz
iio: adc: ad7173: fix using shared static info struct
commit 36a44e05cd807a54e5ffad4b96d0d67f68ad8576 upstream. Fix a possible race condition during driver probe in the ad7173 driver due to using a shared static info struct. If more that one instance of the driver is probed at the same time, some of the info could be overwritten by the other instance, leading to incorrect operation. To fix this, make the static info struct const so that it is read-only and make a copy of the info struct for each instance of the driver that can be modified. Reported-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Fixes: 76a1e6a42802 ("iio: adc: ad7173: add AD7173 driver") Signed-off-by: David Lechner <dlechner@baylibre.com> Tested-by: Guillaume Ranquet <granquet@baylibre.com> Link: https://patch.msgid.link/20241127-iio-adc-ad7313-fix-non-const-info-struct-v2-1-b6d7022b7466@baylibre.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions