From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 5/5] netfilter: nf_conncount: use rb_link_node_rcu() instead of rb_link_node()
Date: Thu, 13 Dec 2018 02:06:31 +0100 [thread overview]
Message-ID: <20181213010631.9753-6-pablo@netfilter.org> (raw)
In-Reply-To: <20181213010631.9753-1-pablo@netfilter.org>
From: Taehee Yoo <ap420073@gmail.com>
rbnode in insert_tree() is rcu protected pointer.
So, in order to handle this pointer, _rcu function should be used.
rb_link_node_rcu() is a rcu version of rb_link_node().
Fixes: 34848d5c896e ("netfilter: nf_conncount: Split insert and traversal")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/nf_conncount.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nf_conncount.c b/net/netfilter/nf_conncount.c
index b6d0f6deea86..9cd180bda092 100644
--- a/net/netfilter/nf_conncount.c
+++ b/net/netfilter/nf_conncount.c
@@ -427,7 +427,7 @@ insert_tree(struct net *net,
count = 1;
rbconn->list.count = count;
- rb_link_node(&rbconn->node, parent, rbnode);
+ rb_link_node_rcu(&rbconn->node, parent, rbnode);
rb_insert_color(&rbconn->node, root);
out_unlock:
spin_unlock_bh(&nf_conncount_locks[hash % CONNCOUNT_LOCK_SLOTS]);
--
2.11.0
next prev parent reply other threads:[~2018-12-13 1:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-13 1:06 [PATCH 0/5] Netfilter fixes for net Pablo Neira Ayuso
2018-12-13 1:06 ` [PATCH 1/5] netfilter: nf_tables: fix suspicious RCU usage in nft_chain_stats_replace() Pablo Neira Ayuso
2018-12-13 1:06 ` [PATCH 2/5] netfilter: seqadj: re-load tcp header pointer after possible head reallocation Pablo Neira Ayuso
2018-12-13 1:06 ` [PATCH 3/5] netfilter: ipset: do not call ipset_nest_end after nla_nest_cancel Pablo Neira Ayuso
2018-12-13 1:06 ` [PATCH 4/5] netfilter: nat: can't use dst_hold on noref dst Pablo Neira Ayuso
2018-12-13 1:06 ` Pablo Neira Ayuso [this message]
2018-12-13 5:37 ` [PATCH 0/5] Netfilter fixes for net David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181213010631.9753-6-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).