mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 23:14:31 +08:00
b2a431915d
Fix memory leak in phy_device_free() for the case when phy_device* returned by phy_device_create() is not registered in the system. Bug description: phy_device_create() sets name of kobject using dev_set_name(), which allocates memory using kvasprintf(), but this memory isn't freed if the underlying device isn't registered properly, because kobject_cleanup() is not called in that case. This can happen (and actually is happening on our machines) if phy_device_register(), called by mdiobus_scan(), fails. Patch description: Embedded struct device is initialized in phy_device_create() and it counterpart phy_device_free() just drops one reference to the device, which leads to proper deinitialization including releasing the kobject name memory. Signed-off-by: Petr Malat <oss@malat.biz> Signed-off-by: David S. Miller <davem@davemloft.net> |
||
---|---|---|
.. | ||
amd.c | ||
at803x.c | ||
bcm63xx.c | ||
bcm87xx.c | ||
broadcom.c | ||
cicada.c | ||
davicom.c | ||
dp83640_reg.h | ||
dp83640.c | ||
et1011c.c | ||
fixed.c | ||
icplus.c | ||
Kconfig | ||
lxt.c | ||
Makefile | ||
marvell.c | ||
mdio_bus.c | ||
mdio-bitbang.c | ||
mdio-gpio.c | ||
mdio-mux-gpio.c | ||
mdio-mux-mmioreg.c | ||
mdio-mux.c | ||
mdio-octeon.c | ||
micrel.c | ||
national.c | ||
phy_device.c | ||
phy.c | ||
qsemi.c | ||
realtek.c | ||
smsc.c | ||
spi_ks8995.c | ||
ste10Xp.c | ||
vitesse.c |