Re: [PATCH] net: mdiobus: Fix memory leak in __mdiobus_register

From: Pavel Skripkin
Date: Tue Sep 28 2021 - 07:09:13 EST


On 9/28/21 14:06, Pavel Skripkin wrote:
It's not actually the same. The state has to be set before the
device_register() or there is still a leak.

Ah, I see... I forgot to handle possible device_register() error. Will
send v2 soon, thank you



Wait... Yanfei's patch is already applied to net tree and if I understand correctly, calling put_device() 2 times will cause UAF or smth else.




With regards,
Pavel Skripkin