usb: gadget: f_ncm: fix skb_clone memleak on error
Subsystems (2)
PATCH 1/1 usb: gadget: f_ncm: fix skb_clone memleak on error
In reply to a message not in the archiveFixed skb_clone pointer memleak on error path. Since the newly cloned skb is still not added to the list, hence purge list wont free the cloned skb.
stable-3.14.y: 5d7b0fcc26
--- drivers/usb/gadget/f_ncm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/gadget/f_ncm.c +2 -0
@@ -1066,6 +1066,8 @@ static int ncm_unwrap_ntb(struct gether *port, }if (!skb_pull (skb2, index)) { +if (skb2 != skb) +dev_kfree_skb_any (skb2); ret = -EOVERFLOW ; goto err; }
--
2.1.4
correct netdev address
Quoted 6 lines · * Pavitrakumar Managutte | 2016-01-03 15:07:21 [+0530]:
Fixed
skb_clonepointer memleak on error path. Since the newly cloned skb is still not added to the list, hence purge list wont free the cloned skb.
stable-3.14.y:5d7b0fcc26Signed-off-by Pavitrakumar Managutte <[email protected]>
Can you check if commit 66847062a6e3 ("usb: gadget: NCM: Stop RX TCP Bursts getting dropped.") works for you? That would be [0]. If that is the case then *this* patch should be pushed stable.
[0] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=66847062a6e3
Sebastian
Totally missed this. Will test this today and update.
Quoted 18 lines · Sebastian Andrzej Siewior
correct netdev address
Quoted 6 lines · * Pavitrakumar Managutte | 2016-01-03 15:07:21 [+0530]:
Fixed
skb_clonepointer memleak on error path. Since the newly cloned skb is still not added to the list, hence purge list wont free the cloned skb.
stable-3.14.y:5d7b0fcc26Signed-off-by Pavitrakumar Managutte <[email protected]>Can you check if commit
66847062a6e3("usb: gadget: NCM: Stop RX TCP Bursts getting dropped.") works for you? That would be [0]. If that is the case then *this* patch should be pushed stable.[0] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=66847062a6e3
Sebastian