summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/vport-vxlan.c
diff options
context:
space:
mode:
authorPravin B Shelar2014-12-24 01:20:32 +0100
committerDavid S. Miller2014-12-24 05:57:31 +0100
commit997e068ebc17d8d57e735578df44b6341cd5f2f3 (patch)
tree2fc6e7b30a84898baeb28fd3ec783e292541335c /net/openvswitch/vport-vxlan.c
parentopenvswitch: Fix GSO with multiple MPLS label. (diff)
downloadkernel-qcow2-linux-997e068ebc17d8d57e735578df44b6341cd5f2f3.tar.gz
kernel-qcow2-linux-997e068ebc17d8d57e735578df44b6341cd5f2f3.tar.xz
kernel-qcow2-linux-997e068ebc17d8d57e735578df44b6341cd5f2f3.zip
openvswitch: Fix vport_send double free
Today vport-send has complex error handling because it involves freeing skb and updating stats depending on return value from vport send implementation. This can be simplified by delegating responsibility of freeing skb to the vport implementation for all cases. So that vport-send needs just update stats. Fixes: 91b7514cdf ("openvswitch: Unify vport error stats handling") Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/vport-vxlan.c')
-rw-r--r--net/openvswitch/vport-vxlan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/openvswitch/vport-vxlan.c b/net/openvswitch/vport-vxlan.c
index 38f95a52241b..d7c46b301024 100644
--- a/net/openvswitch/vport-vxlan.c
+++ b/net/openvswitch/vport-vxlan.c
@@ -187,7 +187,9 @@ static int vxlan_tnl_send(struct vport *vport, struct sk_buff *skb)
false);
if (err < 0)
ip_rt_put(rt);
+ return err;
error:
+ kfree_skb(skb);
return err;
}