[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVOmJvZT51xLhh12S4AtpPaomqv9XQL1NvAOg_uO0PtOrA@mail.gmail.com>
Date: Mon, 5 Aug 2013 17:23:57 +0800
From: Ming Lei <ming.lei@...onical.com>
To: Oliver Neukum <oneukum@...e.de>
Cc: "David S. Miller" <davem@...emloft.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Sarah Sharp <sarah.a.sharp@...ux.intel.com>,
netdev@...r.kernel.org, linux-usb@...r.kernel.org,
Eric Dumazet <eric.dumazet@...il.com>,
Ben Hutchings <bhutchings@...arflare.com>,
Grant Grundler <grundler@...gle.com>,
Freddy Xin <freddy@...x.com.tw>,
Alan Stern <stern@...land.harvard.edu>
Subject: Re: [PATCH v2 3/4] USBNET: support DMA SG
On Mon, Aug 5, 2013 at 5:14 PM, Oliver Neukum <oneukum@...e.de> 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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists