netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usbnet: fix oops in usbnet_start_xmit
@ 2011-11-06 19:33 Konstantin Khlebnikov
  2011-11-07 13:29 ` Michael Riesch
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Konstantin Khlebnikov @ 2011-11-06 19:33 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: netdev, David S. Miller, devel, Michael Riesch

This patch fixes the bug added in commit v3.1-rc7-1055-gf9b491e
SKB can be NULL at this point, at least for cdc-ncm.
Let's call skb_tx_timestamp() after driver specific tx-fixup hacks.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
---
 drivers/net/usb/usbnet.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 7d60821..485be70 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1057,8 +1057,6 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
 	unsigned long		flags;
 	int retval;
 
-	skb_tx_timestamp(skb);
-
 	// some devices want funky USB-level framing, for
 	// win32 driver (usually) and/or hardware quirks
 	if (info->tx_fixup) {
@@ -1075,6 +1073,8 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
 	}
 	length = skb->len;
 
+	skb_tx_timestamp(skb);
+
 	if (!(urb = usb_alloc_urb (0, GFP_ATOMIC))) {
 		netif_dbg(dev, tx_err, dev->net, "no urb\n");
 		goto drop;

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

end of thread, other threads:[~2011-11-07 18:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-06 19:33 [PATCH] usbnet: fix oops in usbnet_start_xmit Konstantin Khlebnikov
2011-11-07 13:29 ` Michael Riesch
2011-11-07 13:33 ` Richard Cochran
2011-11-07 14:05   ` Konstantin Khlebnikov
2011-11-07 14:42     ` Richard Cochran
2011-11-07 15:54 ` [PATCH v2] " Konstantin Khlebnikov
2011-11-07 17:39   ` Richard Cochran
2011-11-07 18:26     ` David Miller

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).