rtlwifi: rtl_usb: Fix for URB leaking when doing ifconfig up/down
authorMichael Schenk <michael.schenk@albis-elcon.com>
Thu, 26 Jan 2017 17:25:04 +0000 (11:25 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Feb 2017 10:07:51 +0000 (11:07 +0100)
commit151d4c0fb55bd12cc501f0a9158afc82820e30cd
treebe1ef1f1b8ccdeae9205b4005813050fb809b71c
parentde5634875b604674561bf2e97ef58f213c83bc30
rtlwifi: rtl_usb: Fix for URB leaking when doing ifconfig up/down

commit 575ddce0507789bf9830d089557d2199d2f91865 upstream.

In the function rtl_usb_start we pre-allocate a certain number of urbs
for RX path but they will not be freed when calling rtl_usb_stop. This
results in leaking urbs when doing ifconfig up and down. Eventually,
the system has no available urbs.

Signed-off-by: Michael Schenk <michael.schenk@albis-elcon.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/realtek/rtlwifi/usb.c