add refcount to ct timeout/helper
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | netfilter: nfnetlink_cthelper: use {READ,WRITE}_ONCE for accessing helper flagsnet/ net/ | +16 | 0 replies | |
| 2/6 | netfilter: cttimeout: detach dataplane timeout policy and add refcountinclude/ include/ net/ +4 more | +94 | 0 replies | |
| 3/6 | netfilter: nf_conntrack_helper: dynamically allocate struct nf_conntrack_helperinclude/ net/ net/ +11 more | +174 | 0 replies | |
| 4/6 | netfilter: nf_conntrack_pptp: move GRE specific cleanup to GRE trackerinclude/ net/ net/ | +67 | 0 replies | |
| 5/6 | netfilter: nf_conntrack_helper: add refcounting from datapathinclude/ net/ net/ +5 more | +66 | 3 replies | |
| 6/6 | netfilter: conntrack: revert ct extension genid infrastructureinclude/ include/ net/ +3 more | +4 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH nf-next 0/6] add refcount to ct timeout/helper
Hi,
This is change in the direction of the original series..
This series reworks the ct timeout/helper infrastructure to add a refcount for tracking the use of these objects from the ct extension area.
This is to address the existing races with unconfirmed conntracks that could sit in the nfqueue (or elsewhere) leading to access to stale pointer on reinject if ct timeout/helper goes away. Also module removal could lead to issues.
The idea in this series is to dynamically allocation the ct helper and timeout so the memory areas are released when the last use on them is dropped via refcounting.
Patch #1 adds the {READ,WRITE}_ONCE notation to nfnetlink_cthelper. Patch #2 adds refcounting to the ct timeout policy.
Patch #3 is a preparation patch which moves the ct helper from BSS
to slab.
Patch #4 move GRE PPTP destroy so removal of .destroy so this stays
around on removal.
Patch #5 add the refcounting to the ct helper datapath. Patch #6 revert the ct extension genid and the nf_ct_iterate_destroy()
now that refcounting tracks use of these ct extensions.
Comments welcome.
Thanks.
Pablo Neira Ayuso (6):
netfilter: nfnetlink_cthelper: use {READ,WRITE}_ONCE for accessing helper flags
netfilter: cttimeout: detach dataplane timeout policy and add refcount
netfilter: nf_conntrack_helper: dynamically allocate struct nf_conntrack_helper
netfilter: nf_conntrack_pptp: move GRE specific cleanup to GRE tracker
netfilter: nf_conntrack_helper: add refcounting from datapath
netfilter: conntrack: revert ct extension genid infrastructure
.../net/netfilter/ipv4/nf_conntrack_ipv4.h | 4 + include/net/netfilter/nf_conntrack.h | 6 +- include/net/netfilter/nf_conntrack_extend.h | 12 -- include/net/netfilter/nf_conntrack_helper.h | 41 ++++-- include/net/netfilter/nf_conntrack_timeout.h | 21 +++ net/ipv4/netfilter/nf_nat_snmp_basic_main.c | 19 ++- net/netfilter/nf_conntrack_amanda.c | 39 ++---- net/netfilter/nf_conntrack_core.c | 130 ++---------------- net/netfilter/nf_conntrack_extend.c | 32 +---- net/netfilter/nf_conntrack_ftp.c | 5 +- net/netfilter/nf_conntrack_h323_main.c | 91 +++++------- net/netfilter/nf_conntrack_helper.c | 97 ++++++++----- net/netfilter/nf_conntrack_irc.c | 5 +- net/netfilter/nf_conntrack_netbios_ns.c | 18 ++- net/netfilter/nf_conntrack_netlink.c | 12 +- net/netfilter/nf_conntrack_ovs.c | 14 +- net/netfilter/nf_conntrack_pptp.c | 87 ++---------- net/netfilter/nf_conntrack_proto.c | 15 +- net/netfilter/nf_conntrack_proto_gre.c | 61 ++++++++ net/netfilter/nf_conntrack_sane.c | 5 +- net/netfilter/nf_conntrack_sip.c | 5 +- net/netfilter/nf_conntrack_snmp.c | 21 ++- net/netfilter/nf_conntrack_tftp.c | 5 +- net/netfilter/nf_conntrack_timeout.c | 20 ++- net/netfilter/nf_nat_core.c | 15 +- net/netfilter/nfnetlink_cthelper.c | 40 +++--- net/netfilter/nfnetlink_cttimeout.c | 75 +++++----- net/netfilter/nft_ct.c | 7 +- net/netfilter/xt_CT.c | 7 +- 29 files changed, 418 insertions(+), 491 deletions(-)
Signature · 1 line
2.47.3