]> git.itanic.dy.fi Git - linux-stable/commit
netfilter: conntrack: switch connlabels to atomic_t
authorFlorian Westphal <fw@strlen.de>
Fri, 20 Oct 2023 12:38:15 +0000 (14:38 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 24 Oct 2023 11:16:30 +0000 (13:16 +0200)
commit643d1260366424412e8269caead410d333e3263f
tree343e61c28953acb82bce302e442c54e72e3d1939
parentee6f05dcd6727669b6f49a8a6dafad94a40ee872
netfilter: conntrack: switch connlabels to atomic_t

The spinlock is back from the day when connabels did not have
a fixed size and reallocation had to be supported.

Remove it.  This change also allows to call the helpers from
softirq or timers without deadlocks.

Also add WARN()s to catch refcounting imbalances.

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