All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Khlebnikov <khlebnikov@openvz.org>
To: Oliver Neukum <oneukum@suse.de>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	devel@openvz.org, Michael Riesch <michael@riesch.at>
Subject: [PATCH] usbnet: fix oops in usbnet_start_xmit
Date: Sun, 06 Nov 2011 22:33:37 +0300	[thread overview]
Message-ID: <20111106183337.5379.4356.stgit@zurg> (raw)

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;

             reply	other threads:[~2011-11-06 18:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-06 19:33 Konstantin Khlebnikov [this message]
2011-11-07 13:29 ` [PATCH] usbnet: fix oops in usbnet_start_xmit 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111106183337.5379.4356.stgit@zurg \
    --to=khlebnikov@openvz.org \
    --cc=davem@davemloft.net \
    --cc=devel@openvz.org \
    --cc=michael@riesch.at \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.