From: lepton <ytht.net@gmail.com>
Date: Tue, 23 Aug 2005 00:06:14 +0000 (-0700)
Subject: [PATCH] usbnet oops fix
X-Git-Tag: v2.6.13-rc7~6
X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2bbfb16bf345acd81ab1e6e3d4b35964650517ac;p=linux-2.6-omap-h63xx.git

[PATCH] usbnet oops fix

There's a "return the wrong SKB" error in the GL620A cable minidriver
(for "usbnet") which can oops.  This would not appear when talking
Linux-to-Linux, only Linux-to-Windows (for recent Linuxes).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---

diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
index 576f3b852fc..4528a00c45b 100644
--- a/drivers/usb/net/usbnet.c
+++ b/drivers/usb/net/usbnet.c
@@ -1922,7 +1922,7 @@ static int genelink_rx_fixup (struct usbnet *dev, struct sk_buff *skb)
 
 			// copy the packet data to the new skb
 			memcpy(skb_put(gl_skb, size), packet->packet_data, size);
-			skb_return (dev, skb);
+			skb_return (dev, gl_skb);
 		}
 
 		// advance to the next packet