All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT net] Open vSwitch
@ 2013-02-07  3:14 Jesse Gross
       [not found] ` <1360206896-43022-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
  2013-02-08  4:39 ` [GIT net] Open vSwitch David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Jesse Gross @ 2013-02-07  3:14 UTC (permalink / raw)
  To: David Miller; +Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA

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

The following changes since commit a49f0d1ea3ec94fc7cf33a7c36a16343b74bd565:

  Linux 3.8-rc1 (2012-12-21 17:19:00 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch.git fixes

for you to fetch changes up to d9d59089c43fc33eb403cbb928e56c131f191dd5:

  openvswitch: Move LRO check from transmit to receive. (2013-01-21 23:57:26 -0800)

----------------------------------------------------------------
Jesse Gross (1):
      openvswitch: Move LRO check from transmit to receive.

 net/openvswitch/vport-netdev.c |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] openvswitch: Move LRO check from transmit to receive.
       [not found] ` <1360206896-43022-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
@ 2013-02-07  3:14   ` Jesse Gross
  0 siblings, 0 replies; 3+ messages in thread
From: Jesse Gross @ 2013-02-07  3:14 UTC (permalink / raw)
  To: David Miller; +Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA

The check for LRO packets was incorrectly put in the transmit path
instead of on receive.  Since this check is supposed to protect OVS
(and other parts of the system) from packets that it cannot handle
it is obviously not useful on egress.  Therefore, this commit moves
it back to the receive side.

The primary problem that this caused is upcalls to userspace tried
to segment the packet even though no segmentation information is
available.  This would later cause NULL pointer dereferences when
skb_gso_segment() did nothing.

Signed-off-by: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
---
 net/openvswitch/vport-netdev.c |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c
index a9327e2..670cbc3 100644
--- a/net/openvswitch/vport-netdev.c
+++ b/net/openvswitch/vport-netdev.c
@@ -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).
@@ -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. */
@@ -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);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [GIT net] Open vSwitch
  2013-02-07  3:14 [GIT net] Open vSwitch Jesse Gross
       [not found] ` <1360206896-43022-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
@ 2013-02-08  4:39 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2013-02-08  4:39 UTC (permalink / raw)
  To: jesse; +Cc: netdev, dev

From: Jesse Gross <jesse@nicira.com>
Date: Wed,  6 Feb 2013 19:14:55 -0800

> One bug fix for net/3.8 for a long standing problem that was reported a few
> times recently.
> 
> The following changes since commit a49f0d1ea3ec94fc7cf33a7c36a16343b74bd565:
> 
>   Linux 3.8-rc1 (2012-12-21 17:19:00 -0800)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch.git fixes

Pulled, thanks Jesse.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-08  4:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-07  3:14 [GIT net] Open vSwitch Jesse Gross
     [not found] ` <1360206896-43022-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
2013-02-07  3:14   ` [PATCH] openvswitch: Move LRO check from transmit to receive Jesse Gross
2013-02-08  4:39 ` [GIT net] Open vSwitch David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.