[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5fc05140-76cd-4f19-bbfe-e27e90f21983@gocontroll.com>
Date: Mon, 23 Jun 2025 15:27:44 +0200
From: Maud Spierings <maudspierings@...ontroll.com>
To: Jonathan Cameron <jic23@...nel.org>,
Maud Spierings via B4 Relay <devnull+maudspierings.gocontroll.com@...nel.org>
Cc: David Lechner <dlechner@...libre.com>, Nuno Sá
<nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>,
Christian Heusel <christian@...sel.eu>,
Linus Walleij <linus.walleij@...aro.org>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v4] iio: common: st_sensors: Fix use of uninitialize
device structs
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@...nel.org> wrote:
>
>> From: Maud Spierings <maudspierings@...ontroll.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@...r.kernel.org
>> Signed-off-by: Maud Spierings <maudspierings@...ontroll.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
Powered by blists - more mailing lists