netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fwd: [PATCH stable-3.14] usb: gadget: f_ncm: fix skb_clone memleak on error
       [not found] <1451813841-2359-1-git-send-email-pavitra1729@gmail.com>
@ 2016-01-04  6:16 ` pavi1729
  2016-01-13 13:53 ` Sebastian Andrzej Siewior
  1 sibling, 0 replies; 3+ messages in thread
From: pavi1729 @ 2016-01-04  6:16 UTC (permalink / raw)
  To: netdev

Fixed 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

Signed-off-by: Pavitrakumar Managutte <pavitra1729@gmail.com>
---
 drivers/usb/gadget/f_ncm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/gadget/f_ncm.c b/drivers/usb/gadget/f_ncm.c
index a9499fd..6227fa2 100644
--- a/drivers/usb/gadget/f_ncm.c
+++ b/drivers/usb/gadget/f_ncm.c
@@ -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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH stable-3.14] usb: gadget: f_ncm: fix skb_clone memleak on error
       [not found] <1451813841-2359-1-git-send-email-pavitra1729@gmail.com>
  2016-01-04  6:16 ` Fwd: [PATCH stable-3.14] usb: gadget: f_ncm: fix skb_clone memleak on error pavi1729
@ 2016-01-13 13:53 ` Sebastian Andrzej Siewior
  2016-01-19  6:47   ` pavi1729
  1 sibling, 1 reply; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2016-01-13 13:53 UTC (permalink / raw)
  To: Pavitrakumar Managutte; +Cc: linux-usb, netdev

correct netdev address

* Pavitrakumar Managutte | 2016-01-03 15:07:21 [+0530]:

>Fixed 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
>
>Signed-off-by: Pavitrakumar Managutte <pavitra1729@gmail.com>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH stable-3.14] usb: gadget: f_ncm: fix skb_clone memleak on error
  2016-01-13 13:53 ` Sebastian Andrzej Siewior
@ 2016-01-19  6:47   ` pavi1729
  0 siblings, 0 replies; 3+ messages in thread
From: pavi1729 @ 2016-01-19  6:47 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior; +Cc: linux-usb, netdev

Totally missed this. Will test this today and update.


On Wed, Jan 13, 2016 at 7:23 PM, Sebastian Andrzej Siewior
<bigeasy@linutronix.de> wrote:
> correct netdev address
>
> * Pavitrakumar Managutte | 2016-01-03 15:07:21 [+0530]:
>
>>Fixed 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
>>
>>Signed-off-by: Pavitrakumar Managutte <pavitra1729@gmail.com>
>
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-19  6:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1451813841-2359-1-git-send-email-pavitra1729@gmail.com>
2016-01-04  6:16 ` Fwd: [PATCH stable-3.14] usb: gadget: f_ncm: fix skb_clone memleak on error pavi1729
2016-01-13 13:53 ` Sebastian Andrzej Siewior
2016-01-19  6:47   ` pavi1729

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).