Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 2869

kernel-2.6.18-238.el5.src.rpm

From: Doug Ledford <dledford@redhat.com>
Date: Thu, 16 Jul 2009 14:12:09 -0400
Subject: [net] mlx4_en: problem with LRO that segfaults KVM host
Message-id: C3A89FCA-FF7C-472D-932E-CB1974D14A19@redhat.com
O-Subject: [Patch RHEL5.4] mlx4_en: fix oops on KVM host
Bugzilla: 510789
RH-Acked-by: Jay Fenlason <fenlason@redhat.com>

This addresses bz510789.  When running a mlx4_en ethernet on a KVM
guest, the LRO implementation could cause the host to segfault under
certain conditions (found in IBM testing).  This patch resolves that
issue.  Patch provided by bugzilla reporter and is what upstream used
to resolve the issue, reviewed, built locally, and tested by me.

commit 0521f9debc3bb39ac898d2b7687888f52f5148a4
Author: Doug Ledford <dledford@redhat.com>
Date:   Thu Jul 16 12:49:49 2009 -0400

    [mlx4_en] Fix problem with LRO that segfaults KVM host

    Signed-off-by: Doug Ledford <dledford@redhat.com>

diff --git a/drivers/net/mlx4/en_lro.c b/drivers/net/mlx4/en_lro.c
index 6a9e897..a987b21 100644
--- a/drivers/net/mlx4/en_lro.c
+++ b/drivers/net/mlx4/en_lro.c
@@ -133,6 +133,7 @@ static void mlx4_en_lro_flush_single(struct mlx4_en_priv* priv,
 	skb->data_len = lro->tot_len - headlen;
 	skb->truesize = skb->len + sizeof(struct sk_buff);
 	skb_shinfo(skb)->gso_size = lro->mss;
+	skb_shinfo(skb)->gso_type |= SKB_GSO_TCPV4;
 
 #ifdef CONFIG_MLX4_EN_DEBUG_LRO
 	mlx4_en_lro_validate(priv, lro);