mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
6b3d933000
commit
49971b8853
|
@ -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]
|
||||
|
||||
|
|
Loading…
Reference in New Issue