[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200130183617.390724625@linuxfoundation.org>
Date: Thu, 30 Jan 2020 19:39:30 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Prameela Rani Garnepudi <prameela.j04cs@...il.com>,
Johan Hovold <johan@...nel.org>,
Kalle Valo <kvalo@...eaurora.org>
Subject: [PATCH 4.19 49/55] rsi: fix memory leak on failed URB submission
From: Johan Hovold <johan@...nel.org>
commit 47768297481184932844ab01a86752ba31a38861 upstream.
Make sure to free the skb on failed receive-URB submission (e.g. on
disconnect or currently also due to a missing endpoint).
Fixes: a1854fae1414 ("rsi: improve RX packet handling in USB interface")
Cc: stable <stable@...r.kernel.org> # 4.17
Cc: Prameela Rani Garnepudi <prameela.j04cs@...il.com>
Signed-off-by: Johan Hovold <johan@...nel.org>
Signed-off-by: Kalle Valo <kvalo@...eaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/net/wireless/rsi/rsi_91x_usb.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/net/wireless/rsi/rsi_91x_usb.c
+++ b/drivers/net/wireless/rsi/rsi_91x_usb.c
@@ -327,8 +327,10 @@ static int rsi_rx_urb_submit(struct rsi_
rx_cb);
status = usb_submit_urb(urb, GFP_KERNEL);
- if (status)
+ if (status) {
rsi_dbg(ERR_ZONE, "%s: Failed in urb submission\n", __func__);
+ dev_kfree_skb(skb);
+ }
return status;
}
Powered by blists - more mailing lists