linux/drivers/net
Petr Malat b2a431915d phy: Fix phy_device_free memory leak
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>
2013-02-28 15:37:30 -05:00
..
appletalk
arcnet ARCNET: remove __dev* attributes 2012-12-03 11:16:10 -08:00
bonding bond: check if slave count is 0 in case when deciding to take slave's mac 2013-02-26 17:30:38 -05:00
caif tty/serial patches for 3.9-rc1 2013-02-21 13:41:04 -08:00
can tty/serial patches for 3.9-rc1 2013-02-21 13:41:04 -08:00
cris ethtool: fix drvinfo strings set in drivers 2013-01-06 21:06:31 -08:00
dsa DSA: Convert spaces to tabs where appropriate 2013-01-10 00:04:34 -08:00
ethernet bnx2x: Fix KR2 work-around condition 2013-02-28 15:37:30 -05:00
fddi drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
hamradio tty/serial patches for 3.9-rc1 2013-02-21 13:41:04 -08:00
hippi drivers/net/hippi: remove depends on CONFIG_EXPERIMENTAL 2013-01-22 12:01:34 -08:00
hyperv Char/Misc driver patches for 3.9-rc1 2013-02-21 13:57:13 -08:00
ieee802154 ieee802154: at86rf230: Remove empty suspend/resume callbacks 2013-02-15 15:35:34 -05:00
irda Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-02-21 17:40:58 -08:00
phy phy: Fix phy_device_free memory leak 2013-02-28 15:37:30 -05:00
plip
ppp tty/serial patches for 3.9-rc1 2013-02-21 13:41:04 -08:00
slip tty: Added a CONFIG_TTY option to allow removal of TTY 2013-01-18 16:15:27 -08:00
team Driver core patches for 3.9-rc1 2013-02-21 12:05:51 -08:00
usb usb/net/asix_devices: Add USBNET HG20F9 ethernet dongle 2013-02-27 13:10:35 -05:00
vmxnet3 vmxnet3: fix ethtool ring buffer size setting 2013-02-24 20:18:55 -05:00
wan tty/serial patches for 3.9-rc1 2013-02-21 13:41:04 -08:00
wimax Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-02-20 18:58:50 -08:00
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-26 11:44:11 -08:00
xen-netback Revert "xen: netback: remove redundant xenvif_put" 2013-02-19 13:04:34 -05:00
dummy.c dummy: implement carrier change 2012-12-28 15:24:19 -08:00
eql.c
ifb.c ifb: dont hard code inet_net use 2013-01-14 15:13:39 -05:00
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-26 11:44:11 -08:00
LICENSE.SRC
loopback.c net: loopback: fix a dst refcounting issue 2013-01-27 01:30:35 -05:00
macvlan.c bridge: Add vlan support to static neighbors 2013-02-13 19:42:16 -05:00
macvtap.c net: Fix possible wrong checksum generation. 2013-02-13 13:30:10 -05:00
Makefile net: Add support for NTB virtual ethernet device 2013-01-17 19:11:14 -08:00
mdio.c
mii.c
netconsole.c netpoll: add IPv6 support 2013-01-08 17:56:10 -08:00
ntb_netdev.c ntb_netdev: Update Version 2013-01-20 15:48:14 -08:00
rionet.c ethtool: fix drvinfo strings set in drivers 2013-01-06 21:06:31 -08:00
sb1000.c
Space.c drivers/net: delete old x86 variant of the seeq8005 driver 2013-01-22 10:39:56 -05:00
sungem_phy.c
tun.c net: Fix possible wrong checksum generation. 2013-02-13 13:30:10 -05:00
veth.c veth: fix NULL dereference in veth_dellink() 2013-02-10 20:41:43 -05:00
virtio_net.c net: Fix possible wrong checksum generation. 2013-02-13 13:30:10 -05:00
vxlan.c VXLAN: Use tunnel_ip_select_ident() for tunnel IP-Identification. 2013-02-25 15:47:41 -05:00
xen-netfront.c xen/netfront: improve truesize tracking 2013-01-07 19:51:19 -08:00