From patchwork Mon Nov 7 15:54:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v2] usbnet: fix oops in usbnet_start_xmit X-Patchwork-Submitter: Konstantin Khlebnikov X-Patchwork-Id: 124093 X-Patchwork-Delegate: davem@davemloft.net Message-Id: <20111107145458.29997.79829.stgit@zurg> To: Oliver Neukum Cc: Michael Riesch , Alexey Orishko , netdev@vger.kernel.org, Richard Cochran , "David S. Miller" , devel@openvz.org Date: Mon, 07 Nov 2011 18:54:58 +0300 From: Konstantin Khlebnikov List-Id: 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. Signed-off-by: Konstantin Khlebnikov Acked-by: Richard Cochran --- drivers/net/usb/usbnet.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 7d60821..fae0fbd 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1057,7 +1057,8 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, unsigned long flags; int retval; - skb_tx_timestamp(skb); + if (skb) + skb_tx_timestamp(skb); // some devices want funky USB-level framing, for // win32 driver (usually) and/or hardware quirks