[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3e589a89-2c5d-61e4-c81e-94a8bf728f7e@ispras.ru>
Date: Tue, 15 Feb 2022 13:06:26 +0300
From: Alexey Khoroshilov <khoroshilov@...ras.ru>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
Florian Fainelli <f.fainelli@...il.com>,
Jakub Kicinski <kuba@...nel.org>,
Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 5.10 073/116] net: dsa: lantiq_gswip: dont use devres for
mdiobus
On 15.02.2022 12:45, Vladimir Oltean wrote:
> On Tue, Feb 15, 2022 at 12:35:44PM +0300, Alexey Khoroshilov wrote:
>>> if (priv->ds->slave_mii_bus) {
>>> mdiobus_unregister(priv->ds->slave_mii_bus);
>>> + mdiobus_free(priv->ds->slave_mii_bus);
>>> of_node_put(priv->ds->slave_mii_bus->dev.of_node);
>>> }
>>
>>
>> Should
>> of_node_put(priv->ds->slave_mii_bus->dev.of_node);
>> be here before
>> mdiobus_free(priv->ds->slave_mii_bus);
>> ?
>
> Thanks for noticing. Yes, this would avoid a use-after-free.
> Do you mind sending a patch to correct this?
>
Surely, I will do.
--
Alexey
Powered by blists - more mailing lists