netfilter: cttimeout: decouple unlink and free on netns destruction
authorFlorian Westphal <fw@strlen.de>
Mon, 11 Apr 2022 11:01:19 +0000 (13:01 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 13 May 2022 16:52:16 +0000 (18:52 +0200)
commit78222bacfca97cb18505df1ba5f3591864498a7e
tree757760ef05b8c462d76c0d65aefbb79020e62b7f
parent1397af5bfd7d32b0cf2adb70a78c9a9e8f11d912
netfilter: cttimeout: decouple unlink and free on netns destruction

Make it so netns pre_exit unlinks the objects from the pernet list, so
they cannot be found anymore.

netns core issues a synchronize_rcu() before calling the exit hooks so
any the time the exit hooks run unconfirmed nf_conn entries have been
free'd or they have been committed to the hashtable.

The exit hook still tags unconfirmed entries as dying, this can
now be removed in a followup change.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack_timeout.h
net/netfilter/nfnetlink_cttimeout.c