Skip to content

Commit

Permalink
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/jesse/openvswitch into openvswitch

Jesse Gross says:

====================
One bug fix for net/3.8 for a long standing problem that was reported a few
times recently.
====================

Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed Feb 8, 2013
2 parents 0c35565 + d9d5908 commit 6cddded
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions net/openvswitch/vport-netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@
/* Must be called with rcu_read_lock. */
static void netdev_port_receive(struct vport *vport, struct sk_buff *skb)
{
if (unlikely(!vport)) {
kfree_skb(skb);
return;
}
if (unlikely(!vport))
goto error;

if (unlikely(skb_warn_if_lro(skb)))
goto error;

/* Make our own copy of the packet. Otherwise we will mangle the
* packet for anyone who came before us (e.g. tcpdump via AF_PACKET).
Expand All @@ -50,6 +51,10 @@ static void netdev_port_receive(struct vport *vport, struct sk_buff *skb)

skb_push(skb, ETH_HLEN);
ovs_vport_receive(vport, skb);
return;

error:
kfree_skb(skb);
}

/* Called with rcu_read_lock and bottom-halves disabled. */
Expand Down Expand Up @@ -169,9 +174,6 @@ static int netdev_send(struct vport *vport, struct sk_buff *skb)
goto error;
}

if (unlikely(skb_warn_if_lro(skb)))
goto error;

skb->dev = netdev_vport->dev;
len = skb->len;
dev_queue_xmit(skb);
Expand Down

0 comments on commit 6cddded

Please sign in to comment.