dect
/
linux-2.6
Archived
13
0
Fork 0

usb ethernet gadget, workaround network stack API glitch

Another workaround for the glitch in the network layer, whereby one call
ignores the (otherwise kernel-wide) convention that free() calls should
not oops when passed nulls.  This code already handles that API glitch in
most other paths.

From: Erik Hovland <erik@hovland.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Erik Hovland 2007-04-23 10:50:15 -07:00 committed by Greg Kroah-Hartman
parent 83f7d958ea
commit b8d297c93a
1 changed files with 2 additions and 1 deletions

View File

@ -1735,7 +1735,8 @@ enomem:
defer_kevent (dev, WORK_RX_MEMORY);
if (retval) {
DEBUG (dev, "rx submit --> %d\n", retval);
dev_kfree_skb_any (skb);
if (skb)
dev_kfree_skb_any(skb);
spin_lock(&dev->req_lock);
list_add (&req->list, &dev->rx_reqs);
spin_unlock(&dev->req_lock);