From: Kyle Mestery Date: Wed, 9 Jan 2013 19:47:41 +0000 (-0500) Subject: datapath: Fix a kernel crash when adding a 2nd VXLAN port with existing UDP port X-Git-Tag: v1.10.0~232 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=3b6f2889400fd340b851c2d36356457559ae6e81;p=cascardo%2Fovs.git datapath: Fix a kernel crash when adding a 2nd VXLAN port with existing UDP port When creating a second VXLAN tunnel port with the same UDP port as an existing VXLAN tunnel port, make sure to set *vxport before returning. Fixes a kernel crash. Reported-by: Todd Ruch Signed-off-by: Kyle Mestery Signed-off-by: Jesse Gross --- diff --git a/datapath/vport-vxlan.c b/datapath/vport-vxlan.c index a2cbeb968..f72b95f57 100644 --- a/datapath/vport-vxlan.c +++ b/datapath/vport-vxlan.c @@ -267,6 +267,7 @@ static int vxlan_tunnel_setup(struct net *net, struct nlattr *options, if (vxlan_port) { vxlan_port->count++; err = 0; + *vxport = vxlan_port; goto out; }