[ovs-dev] [ovs-discuss] kernel crash - openvswitch_mod

Luiz Ozaki luiz.ozaki at locaweb.com.br
Fri May 25 10:58:56 UTC 2012


On 5/16/12 11:47 PM, Jesse Gross wrote:
> On Wed, May 16, 2012 at 7:45 PM, Ben Pfaff<blp at nicira.com>  wrote:
>> I would expect that only a host kernel bug (inside or outside the OVS
>> kernel module) would cause a host kernel panic and reboot, so I am
>> surprised at the idea that a bug in Xen tools (in the guest) would cause
>> a host reboot.  Is that really what you meant?
> Well, it's also a bug in the host kernel if it allows it but I think I
> remember a problem along these lines.
>
Changed to Dev Mailing...

We might have found the problem in the kernel function 
"skb_gso_segment"... Doing some test to check.

Anyways, looking at the OVS code I see this skb_gso_segment called in 
other places and handled in different ways:
./datapath/vport-netdev.c
./datapath/tunnel.c
./datapath/datapath.c

./datapath/linux/compat/netdevice.c

Doesn't rpl_skb_gso_segment need to check IS_ERR and return the PTR_ERR 
if it's true ?

Does it make sense ?

Something like this:

diff --git a/datapath/linux/compat/netdevice.c 
b/datapath/linux/compat/netdevice.c
index 9e92eeb..7974e8c 100644
--- a/datapath/linux/compat/netdevice.c
+++ b/datapath/linux/compat/netdevice.c
@@ -95,6 +95,9 @@ struct sk_buff *rpl_skb_gso_segment(struct sk_buff 
*skb, u32 features)

         skb_gso = skb_gso_segment(skb, features);
         skb->protocol = skb_proto;
+       if (IS_ERR(skb))
+               return PTR_ERR(skb);
+
         return skb_gso;
  }
  #endif /* kernel version < 2.6.38 */

-- 
Luiz Henrique Ozaki




More information about the dev mailing list