提交 23ba0799 编写于 作者: K Konstantin Khlebnikov 提交者: David S. Miller

usbnet: fix oops in usbnet_start_xmit

This patch fixes the bug added in commit v3.1-rc7-1055-gf9b491ec
SKB can be NULL at this point, at least for cdc-ncm.
Signed-off-by: NKonstantin Khlebnikov <khlebnikov@openvz.org>
Acked-by: NRichard Cochran <richardcochran@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 01264108
...@@ -1057,7 +1057,8 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, ...@@ -1057,7 +1057,8 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
unsigned long flags; unsigned long flags;
int retval; int retval;
skb_tx_timestamp(skb); if (skb)
skb_tx_timestamp(skb);
// some devices want funky USB-level framing, for // some devices want funky USB-level framing, for
// win32 driver (usually) and/or hardware quirks // win32 driver (usually) and/or hardware quirks
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册