Re: [PATCH] net: mdiobus: fix device unregistering in mdiobus_register

2020-08-26 Thread Sascha Hauer
On Wed, Aug 26, 2020 at 06:26:36PM +0200, Heiner Kallweit wrote: > On 26.08.2020 11:51, Sascha Hauer wrote: > > __mdiobus_register() can fail between calling device_register() and > > setting bus->state to MDIOBUS_REGISTERED. When this happens the caller > > will call mdiobus_free() which then free

Re: [PATCH] net: mdiobus: fix device unregistering in mdiobus_register

2020-08-26 Thread Heiner Kallweit
On 26.08.2020 11:51, Sascha Hauer wrote: > __mdiobus_register() can fail between calling device_register() and > setting bus->state to MDIOBUS_REGISTERED. When this happens the caller > will call mdiobus_free() which then frees the mdio bus structure. This > is not allowed as the embedded struct de

[PATCH] net: mdiobus: fix device unregistering in mdiobus_register

2020-08-26 Thread Sascha Hauer
__mdiobus_register() can fail between calling device_register() and setting bus->state to MDIOBUS_REGISTERED. When this happens the caller will call mdiobus_free() which then frees the mdio bus structure. This is not allowed as the embedded struct device is already registered, thus must be freed dr