kernel_optimize_test/net/openvswitch
Joe Stringer 90c7afc96c openvswitch: Fix template leak in error cases.
Commit 5b48bb8506c5 ("openvswitch: Fix helper reference leak") fixed a
reference leak on helper objects, but inadvertently introduced a leak on
the ct template.

Previously, ct_info.ct->general.use was initialized to 0 by
nf_ct_tmpl_alloc() and only incremented when ovs_ct_copy_action()
returned successful. If an error occurred while adding the helper or
adding the action to the actions buffer, the __ovs_ct_free_action()
cleanup would use nf_ct_put() to free the entry; However, this relies on
atomic_dec_and_test(ct_info.ct->general.use). This reference must be
incremented first, or nf_ct_put() will never free it.

Fix the issue by acquiring a reference to the template immediately after
allocation.

Fixes: cae3a26275 ("openvswitch: Allow attaching helpers to ct action")
Fixes: 5b48bb8506c5 ("openvswitch: Fix helper reference leak")
Signed-off-by: Joe Stringer <joe@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-29 15:27:52 -05:00
..
actions.c
conntrack.c openvswitch: Fix template leak in error cases. 2015-12-29 15:27:52 -05:00
conntrack.h
datapath.c
datapath.h
dp_notify.c openvswitch: fix hangup on vxlan/gre/geneve device deletion 2015-12-03 14:29:25 -05:00
flow_netlink.c openvswitch: correct encoding of set tunnel action attributes 2015-12-18 16:35:35 -05:00
flow_netlink.h
flow_table.c
flow_table.h
flow.c
flow.h
Kconfig
Makefile
vport-geneve.c openvswitch: properly refcount vport-vxlan module 2015-12-02 11:50:59 -05:00
vport-gre.c openvswitch: properly refcount vport-vxlan module 2015-12-02 11:50:59 -05:00
vport-internal_dev.c
vport-internal_dev.h
vport-netdev.c openvswitch: fix hangup on vxlan/gre/geneve device deletion 2015-12-03 14:29:25 -05:00
vport-netdev.h
vport-vxlan.c
vport.c openvswitch: properly refcount vport-vxlan module 2015-12-02 11:50:59 -05:00
vport.h openvswitch: properly refcount vport-vxlan module 2015-12-02 11:50:59 -05:00