From: Maud Spierings <maudspierings@gocontroll.com>
To: Jonathan Cameron <jic23@kernel.org>,
Maud Spierings via B4 Relay
<devnull+maudspierings.gocontroll.com@kernel.org>
Cc: "David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Christian Heusel" <christian@heusel.eu>,
"Linus Walleij" <linus.walleij@linaro.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v4] iio: common: st_sensors: Fix use of uninitialize device structs
Date: Mon, 23 Jun 2025 15:27:44 +0200 [thread overview]
Message-ID: <5fc05140-76cd-4f19-bbfe-e27e90f21983@gocontroll.com> (raw)
In-Reply-To: <20250531180319.21365159@jic23-huawei>
On 5/31/25 19:03, Jonathan Cameron wrote:
> On Tue, 27 May 2025 08:36:08 +0200
> Maud Spierings via B4 Relay <devnull+maudspierings.gocontroll.com@kernel.org> wrote:
>
>> From: Maud Spierings <maudspierings@gocontroll.com>
>>
>> Throughout the various probe functions &indio_dev->dev is used before it
>> is initialized. This caused a kernel panic in st_sensors_power_enable()
>> when the call to devm_regulator_bulk_get_enable() fails and then calls
>> dev_err_probe() with the uninitialized device.
>>
>> This seems to only cause a panic with dev_err_probe(), dev_err(),
>> dev_warn() and dev_info() don't seem to cause a panic, but are fixed
>> as well.
>>
>> The issue is reported and traced here: [1]
>>
>> Link: https://lore.kernel.org/all/AM7P189MB100986A83D2F28AF3FFAF976E39EA@AM7P189MB1009.EURP189.PROD.OUTLOOK.COM/ [1]
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Maud Spierings <maudspierings@gocontroll.com>
>> ---
>> When I search for general &indio_dev->dev usage, I see quite a lot more
>> hits, but I am not sure if there are issues with those too.
>
> For probe error messages I'd like to see them all moved over to the parent
> device but more generally it may make sense to use indio_dev->dev
>
> As per the earlier discussion I still wonder if we should harden
> device_set_deferred_reason() against this condition just as a
> defense in depth thing.
>
> Anyhow, this is a good change in any case. Applied to the fixes-togreg-for-6.16 branch
> that I'll rebase on rc1 once available.
Hi, I've not seen this patch pass by in the stable tree or will this get
submitted for 6.17-rc1?
Sorry if I am being too impatient.
kind regards,
Maud
next prev parent reply other threads:[~2025-06-23 13:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-27 6:36 [PATCH v4] iio: common: st_sensors: Fix use of uninitialize device structs Maud Spierings via B4 Relay
2025-05-27 8:18 ` Andy Shevchenko
2025-05-31 17:03 ` Jonathan Cameron
2025-06-23 13:27 ` Maud Spierings [this message]
2025-06-28 17:11 ` 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=5fc05140-76cd-4f19-bbfe-e27e90f21983@gocontroll.com \
--to=maudspierings@gocontroll.com \
--cc=andy@kernel.org \
--cc=christian@heusel.eu \
--cc=devnull+maudspierings.gocontroll.com@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=stable@vger.kernel.org \
/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