]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
netfilter: nf_ct_expect: use proper RCU list traversal/update APIs
authorLiping Zhang <zlpnobody@gmail.com>
Sun, 2 Apr 2017 10:25:37 +0000 (18:25 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 8 Apr 2017 21:52:17 +0000 (23:52 +0200)
commit7cddd967bfc2e4fc6b3218c2ddc67fbeed433ad3
treea6f7bdfda4629a5a413b941c2a76ce965ee9b61e
parent207df81501021f6d1a935cebf8e1f34d6d25564b
netfilter: nf_ct_expect: use proper RCU list traversal/update APIs

We should use proper RCU list APIs to manipulate help->expectations,
as we can dump the conntrack's expectations via nfnetlink, i.e. in
ctnetlink_exp_ct_dump_table(), where only rcu_read_lock is acquired.

So for list traversal, use hlist_for_each_entry_rcu; for list add/del,
use hlist_add_head_rcu and hlist_del_rcu.

Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_expect.c
net/netfilter/nf_conntrack_netlink.c