From: Oliver Neukum <oneukum@xxxxxxx> Date: Sat, 03 Aug 2013 07:56:53 +0200 > On Sat, 2013-08-03 at 10:46 +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; > > Where do you free urb->sg? Indeed, this appears to leak. The devio.c code in the USB layer takes care to manage freeing of the urb->sg, so this usbnet code will have to as well. -- 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