linux/drivers/net
Hemant Kumar 545bc464cb net: usb: Fix memory leak on Tx data path
[ Upstream commit 39707c2a3b ]

Driver anchors the tx urbs and defers the urb submission if
a transmit request comes when the interface is suspended.
Anchoring urb increments the urb reference count. These
deferred urbs are later accessed by calling usb_get_from_anchor()
for submission during interface resume. usb_get_from_anchor()
unanchors the urb but urb reference count remains same.
This causes the urb reference count to remain non-zero
after usb_free_urb() gets called and urb never gets freed.
Hence call usb_put_urb() after anchoring the urb to properly
balance the reference count for these deferred urbs. Also,
unanchor these deferred urbs during disconnect, to free them
up.

Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-17 13:16:16 -08:00
..
appletalk Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
arcnet arcnet: rimi: Fix device name in debug output 2012-04-17 22:22:43 -04:00
bonding bonding: Manage /proc/net/bonding/ entries from the netdev events 2012-07-19 08:58:58 -07:00
caif caif: fix NULL pointer check 2012-08-09 08:31:50 -07:00
can can: mscan-mpc5xxx: fix return value check in mpc512x_can_get_clock() 2012-10-07 08:32:28 -07:00
cris Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
dsa
ethernet skge: Add DMA mask quirk for Marvell 88E8001 on ASUS P5NSLI motherboard 2012-10-28 10:14:15 -07:00
fddi
hamradio Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hippi Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hyperv net/hyperv: Adding cancellation to ensure rndis filter is closed 2012-04-21 15:38:10 -04:00
irda ARM: sa11x0: fix build errors from DMA engine API updates 2012-03-30 11:46:20 +01:00
phy icplus: fix interrupt for IC+ 101A/G and 1001LF 2012-04-19 15:34:18 -04:00
plip Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ppp pppoe: drop PPPOX_ZOMBIEs in pppoe_release 2012-10-13 05:38:44 +09:00
slip Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
team
tokenring Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
usb net: usb: Fix memory leak on Tx data path 2012-11-17 13:16:16 -08:00
vmxnet3
wan ixp4xx_hss: fix build failure due to missing linux/module.h inclusion 2012-10-13 05:38:42 +09:00
wimax Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
wireless rt2800: validate step value for temperature compensation 2012-11-17 13:15:55 -08:00
xen-netback
dummy.c dummy: fix rcu_sched self-detected stalls 2012-07-16 09:03:47 -07:00
eql.c eql: dont rely on HZ=100 2012-03-27 22:45:26 -04:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
macvlan.c Revert "net: maintain namespace isolation between vlan and real device" 2012-05-10 23:03:34 -04:00
macvtap.c macvtap: zerocopy: set SKBTX_DEV_ZEROCOPY only when skb is built successfully 2012-10-02 10:30:34 -07:00
Makefile
mdio.c
mii.c
netconsole.c netconsole: remove a redundant netconsole_target_put() 2012-10-02 10:29:51 -07:00
rionet.c rapidio/rionet: fix multicast packet transmit logic 2012-10-13 05:38:39 +09:00
sb1000.c
Space.c
sungem_phy.c
tun.c tun: don't zeroize sock->file on detach 2012-08-15 08:10:33 -07:00
veth.c
virtio_net.c virtio_net: invoke softirqs after __napi_schedule 2012-05-17 12:16:38 +03:00
xen-netfront.c xen/netfront: teardown the device before unregistering it. 2012-07-16 09:03:49 -07:00