]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: ipt_CLUSTERIP: put config instead of freeing it
authorFlorian Westphal <fw@strlen.de>
Fri, 16 Feb 2018 11:49:33 +0000 (12:49 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 25 Feb 2018 19:02:51 +0000 (20:02 +0100)
commitc56b194c0bc6a1f8608766f3d34271c711fcd6e3
treef36b3e66662b97534c91743863b0c7456c4f486c
parent5577ff5f9815c3dd6c6763411605de170aac4199
netfilter: ipt_CLUSTERIP: put config instead of freeing it

Once struct is added to per-netns list it becomes visible to other cpus,
so we cannot use kfree().

Also delay setting entries refcount to 1 until after everything is
initialised so that when we call clusterip_config_put() in this spot
entries is still zero.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/ipt_CLUSTERIP.c