]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: ipset: Fix calling ip_set() macro at dumping
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Tue, 30 Oct 2018 21:43:42 +0000 (22:43 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 3 Nov 2018 12:28:01 +0000 (13:28 +0100)
commitd8856341f7b92d011497bab658aecbd4d8ed1ad0
treeda24e01ea80e6ecccc657fe8891ae5925874d58c
parent3337d8bf8ac05c6d8a24f0bec9eded722a5b5e29
netfilter: ipset: Fix calling ip_set() macro at dumping

The ip_set() macro is called when either ip_set_ref_lock held only
or no lock/nfnl mutex is held at dumping. Take this into account
properly. Also, use Pablo's suggestion to use rcu_dereference_raw(),
the ref_netlink protects the set.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipset/ip_set_core.c