* [PATCH] Revert "openvswitch: Fix template leak in error cases."
@ 2018-09-28 17:55 Flavio Leitner
2018-10-01 22:46 ` Joe Stringer
[not found] ` <20180928175534.13590-1-fbl-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 2 replies; 3+ messages in thread
From: Flavio Leitner @ 2018-09-28 17:55 UTC (permalink / raw)
To: netfilter-devel, netdev, dev
Cc: Pravin B Shelar, Joe Stringer, Flavio Leitner
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>
---
net/openvswitch/conntrack.c | 6 ++----
1 file 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,
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);
--
2.14.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Revert "openvswitch: Fix template leak in error cases."
2018-09-28 17:55 [PATCH] Revert "openvswitch: Fix template leak in error cases." Flavio Leitner
@ 2018-10-01 22:46 ` Joe Stringer
[not found] ` <20180928175534.13590-1-fbl-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
1 sibling, 0 replies; 3+ messages in thread
From: Joe Stringer @ 2018-10-01 22:46 UTC (permalink / raw)
To: Flavio Leitner; +Cc: netfilter-devel, netdev, ovs dev, pravin shelar
On Fri, 28 Sep 2018 at 10:55, Flavio Leitner <fbl@redhat.com> wrote:
>
> 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>
> ---
Thanks for the cleanup.
Acked-by: Joe Stringer <joe@ovn.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Revert "openvswitch: Fix template leak in error cases."
[not found] ` <20180928175534.13590-1-fbl-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2018-10-02 6:21 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2018-10-02 6:21 UTC (permalink / raw)
To: fbl-H+wXaHxf7aLQT0dZR+AlfA
Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA,
netfilter-devel-u79uwXL29TY76Z2rM5mHXA
From: Flavio Leitner <fbl-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Date: Fri, 28 Sep 2018 14:55:34 -0300
> 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-02 6:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-28 17:55 [PATCH] Revert "openvswitch: Fix template leak in error cases." Flavio Leitner
2018-10-01 22:46 ` Joe Stringer
[not found] ` <20180928175534.13590-1-fbl-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-10-02 6:21 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).