netfilter: ipset: Fix parallel resizing and listing of the same set
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Sat, 13 Jun 2015 09:59:45 +0000 (11:59 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Sun, 14 Jun 2015 08:40:15 +0000 (10:40 +0200)
commitc4c997839cf92cb1037e43a85cdb4cbf44ed39a5
treebabab397cd839a813c8ea3b750a8f8da8c936a23
parentf690cbaed9fe4d77592e24139db7ad790641c4fd
netfilter: ipset: Fix parallel resizing and listing of the same set

When elements added to a hash:* type of set and resizing triggered,
parallel listing could start to list the original set (before resizing)
and "continue" with listing the new set. Fix it by references and
using the original hash table for listing. Therefore the destroying of
the original hash table may happen from the resizing or listing functions.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
include/linux/netfilter/ipset/ip_set.h
net/netfilter/ipset/ip_set_core.c
net/netfilter/ipset/ip_set_hash_gen.h