Skip to content

Commit

Permalink
usb ethernet gadget, workaround network stack API glitch
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Erik Hovland authored and Greg Kroah-Hartman committed Apr 27, 2007
1 parent 83f7d95 commit b8d297c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/gadget/ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,8 @@ rx_submit (struct eth_dev *dev, struct usb_request *req, gfp_t gfp_flags)
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);
Expand Down

0 comments on commit b8d297c

Please sign in to comment.