diff options
author | Florian Westphal <fw@strlen.de> | 2017-11-30 21:07:32 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-01-08 18:01:03 +0100 |
commit | 49971b8853f576f4252cbc8fc3df8173d7a56de3 (patch) | |
tree | b0dfd2afd56071295972f10ed1329d70757cec11 /net/netfilter | |
parent | 6b3d933000cbe539e5b234d639b083da60bb275c (diff) | |
download | linux-49971b8853f576f4252cbc8fc3df8173d7a56de3.tar.bz2 |
netfilter: ipset: use nfnl_mutex_is_locked
Check that we really hold nfnl mutex here instead of relying on correct
usage alone.
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/ipset/ip_set_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c index d5a43cad90f0..1f3c03b3bebf 100644 --- a/net/netfilter/ipset/ip_set_core.c +++ b/net/netfilter/ipset/ip_set_core.c @@ -57,7 +57,7 @@ MODULE_ALIAS_NFNL_SUBSYS(NFNL_SUBSYS_IPSET); /* When the nfnl mutex is held: */ #define ip_set_dereference(p) \ - rcu_dereference_protected(p, 1) + rcu_dereference_protected(p, lockdep_nfnl_is_held(NFNL_SUBSYS_IPSET)) #define ip_set(inst, id) \ ip_set_dereference((inst)->ip_set_list)[id] |