Revert "openvswitch: Fix template leak in error cases."
Subsystems (4)
PATCH 1/1 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.
--- net/openvswitch/conntrack.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
net/openvswitch/conntrack.c +2 -4
@@ -1624,10 +1624,6 @@ int ovs_ct_copy_action(struct net *net, const struct nlattr *attr,OVS_NLERR (log,"Failed to allocate conntrack template" );return -ENOMEM ; } - -__set_bit (IPS_CONFIRMED_BIT , &ct_info.ct->status); -nf_conntrack_get (&ct_info.ct->ct_general); -if (helper) { err =ovs_ct_add_helper (&ct_info, helper, key, log);if (err)
@@ -1639,6 +1635,8 @@ int ovs_ct_copy_action(struct net *net, const struct nlattr *attr,if (err) goto err_free_ct; +__set_bit (IPS_CONFIRMED_BIT , &ct_info.ct->status); +nf_conntrack_get (&ct_info.ct->ct_general);return 0 ; err_free_ct:__ovs_ct_free_action (&ct_info);
Signature · 1 line
2.14.4
Quoted 8 lines · Flavio Leitner
This reverts commit
90c7afc96cbbd77f44094b5b651261968e97de67.When the commit was merged, the code used
nf_ct_put()to free the entry, but later on commit76644232e612("openvswitch: Free tmpl withtmpl_free.") replaced that withnf_ct_tmpl_freewhich is a more appropriate. Now the original problem is removed.
Quoted 5 lines
Then
44d6e2f27328("net: ReplaceNF_CT_ASSERT()withWARN_ON().") replaced a debug assert with aWARN_ON()which is trigged now.Signed-off-by Flavio Leitner <[email protected]>---
Thanks for the cleanup.
A message that is not in the archive (sent off-list or not yet received): 20180928175534.13590-1-fbl-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
David Miller
AppliedFrom: Flavio Leitner <[email protected]>
Date: Fri, 28 Sep 2018 14:55:34 -0300
Quoted 11 lines
This reverts commit
90c7afc96cbbd77f44094b5b651261968e97de67.When the commit was merged, the code used
nf_ct_put()to free the entry, but later on commit76644232e612("openvswitch: Free tmpl withtmpl_free.") replaced that withnf_ct_tmpl_freewhich is a more appropriate. Now the original problem is removed.Then
44d6e2f27328("net: ReplaceNF_CT_ASSERT()withWARN_ON().") replaced a debug assert with aWARN_ON()which is trigged now.Signed-off-by Flavio Leitner <[email protected]>
Applied.