]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc2c999d68ea6af98221679e831451a47e327f0e8
tree757760ef05b8c462d76c0d65aefbb79020e62b7f
parentd63d7f88ed22065e4191c60c31fb9009c69fb108
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