Re: [PATCH 5.10 073/116] net: dsa: lantiq_gswip: dont use devres for mdiobus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux