aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlavio Leitner <fbl@redhat.com>2018-09-28 13:55:34 -0400
committerDavid S. Miller <davem@davemloft.net>2018-10-02 02:20:13 -0400
commit7f6d6558ae44bc193eb28df3617c364d3bb6df39 (patch)
treefcac3e43c9e2cb403ab9b9c1ec722430ae764178
parent92d7c74b6f72a8a7d04970d5dcfb99673daaf91d (diff)
Revert "openvswitch: Fix template leak in error cases."
This reverts commit 90c7afc96cbbd77f44094b5b651261968e97de67. When the commit was merged, the code used nf_ct_put() to free the entry, but later on commit 76644232e612 ("openvswitch: Free tmpl with tmpl_free.") replaced that with nf_ct_tmpl_free which is a more appropriate. Now the original problem is removed. Then 44d6e2f27328 ("net: Replace NF_CT_ASSERT() with WARN_ON().") replaced a debug assert with a WARN_ON() which is trigged now. Signed-off-by: Flavio Leitner <fbl@redhat.com> Acked-by: Joe Stringer <joe@ovn.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/openvswitch/conntrack.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index 86a75105af1a..0aeb34c6389d 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -1624,10 +1624,6 @@ int ovs_ct_copy_action(struct net *net, const struct nlattr *attr,
1624 OVS_NLERR(log, "Failed to allocate conntrack template"); 1624 OVS_NLERR(log, "Failed to allocate conntrack template");
1625 return -ENOMEM; 1625 return -ENOMEM;
1626 } 1626 }
1627
1628 __set_bit(IPS_CONFIRMED_BIT, &ct_info.ct->status);
1629 nf_conntrack_get(&ct_info.ct->ct_general);
1630
1631 if (helper) { 1627 if (helper) {
1632 err = ovs_ct_add_helper(&ct_info, helper, key, log); 1628 err = ovs_ct_add_helper(&ct_info, helper, key, log);
1633 if (err) 1629 if (err)
@@ -1639,6 +1635,8 @@ int ovs_ct_copy_action(struct net *net, const struct nlattr *attr,
1639 if (err) 1635 if (err)
1640 goto err_free_ct; 1636 goto err_free_ct;
1641 1637
1638 __set_bit(IPS_CONFIRMED_BIT, &ct_info.ct->status);
1639 nf_conntrack_get(&ct_info.ct->ct_general);
1642 return 0; 1640 return 0;
1643err_free_ct: 1641err_free_ct:
1644 __ovs_ct_free_action(&ct_info); 1642 __ovs_ct_free_action(&ct_info);