Re: [PATCH v2 3/4] USBNET: support DMA SG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 5, 2013 at 5:14 PM, Oliver Neukum <oneukum@xxxxxxx> wrote:
> On Mon, 2013-08-05 at 16:47 +0800, Ming Lei wrote:
>
>> @@ -1268,10 +1298,14 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
>>       entry = (struct skb_data *) skb->cb;
>>       entry->urb = urb;
>>       entry->dev = dev;
>> -     entry->length = length;
>>
>>       usb_fill_bulk_urb (urb, dev->udev, dev->out,
>>                       skb->data, skb->len, tx_complete, skb);
>> +     if (dev->can_dma_sg) {
>> +             if (build_dma_sg(skb, urb) < 0)
>> +                     goto drop;
>
> This is still missing a kfree() for urb->sg in the error case
> of usbnet_start_xmit().

Right, kfree(urb->sg) should be added before usb_free_urb (urb) in
usbnet_start_xmit(), and will fix it in v3.


Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux