netfilter: nf_conncount: remove wrong condition check routine
authorTaehee Yoo <ap420073@gmail.com>
Sun, 25 Nov 2018 09:47:13 +0000 (18:47 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Dec 2018 08:24:37 +0000 (09:24 +0100)
commit8038f92df3eb2a98d68ba78799d4026b099f6705
tree8cf327e73c1af6018d8e547455331fecd4e21e1f
parent5517d4c6dcbb89af8b34c924088132e5839930fa
netfilter: nf_conncount: remove wrong condition check routine

[ Upstream commit 53ca0f2fec39c80ccd19e6e3f30cc8daef174b70 ]

All lists that reach the tree_nodes_free() function have both zero
counter and true dead flag. The reason for this is that lists to be
release are selected by nf_conncount_gc_list() which already decrements
the list counter and sets on the dead flag. Therefore, this if statement
in tree_nodes_free() is unnecessary and wrong.

Fixes: 31568ec09ea0 ("netfilter: nf_conncount: fix list_del corruption in conn_free")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_conncount.c