netfilter: conntrack: free extension area immediately
authorFlorian Westphal <fw@strlen.de>
Tue, 15 Oct 2019 13:19:15 +0000 (15:19 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 17 Oct 2019 09:47:02 +0000 (11:47 +0200)
commit2ad9d7747c10d17cc06447944fefd4c29ae11eb1
tree344f7991b721a5d72a33fd1152857e92e5eeb16a
parent49ca022bccc577d323526215092040fe3b13d68b
netfilter: conntrack: free extension area immediately

Instead of waiting for rcu grace period just free it directly.

This is safe because conntrack lookup doesn't consider extensions.

Other accesses happen while ct->ext can't be free'd, either because
a ct refcount was taken or because the conntrack hash bucket lock or
the dying list spinlock have been taken.

This allows to remove __krealloc in a followup patch, netfilter was the
only user.

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