lkml.org 
[lkml]   [2022]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] can: usb: fix a possible memory leak in esd_usb2_start_xmit
From
Yes. I will create a patch later.

Thanks.

On 2022/2/28 15:51, Marc Kleine-Budde wrote:
> On 28.02.2022 10:05:03, Hangyu Hua wrote:
>> I get it. But this means ems_usb_start_xmit have a redundant
>> dev_kfree_skb beacause can_put_echo_skb delete original skb and
>> can_free_echo_skb delete the cloned skb. While this code is harmless
>> do you think we need to delete it ?
>
> ACK. This dev_kfree_skb() should be deleted:
>
> | err = usb_submit_urb(urb, GFP_ATOMIC);
> | if (unlikely(err)) {
> | can_free_echo_skb(netdev, context->echo_index, NULL);
> |
> | usb_unanchor_urb(urb);
> | usb_free_coherent(dev->udev, size, buf, urb->transfer_dma);
> | dev_kfree_skb(skb);
>
> Can you create a patch?
>
> regards,
> Marc
>

\
 
 \ /
  Last update: 2022-02-28 09:07    [W:0.046 / U:1.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site