From: Pablo Neira Ayuso <pablo@netfilter.org>
To: wenxu@ucloud.cn
Cc: fw@strlen.de, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf-next v3] netfilter: nf_table_offload: Fix the incorrect rcu usage in nft_indr_block_cb
Date: Tue, 3 Sep 2019 22:06:49 +0200 [thread overview]
Message-ID: <20190903200649.vmc5mh56dz3f3jlo@salvia> (raw)
In-Reply-To: <1567480527-27473-1-git-send-email-wenxu@ucloud.cn>
On Tue, Sep 03, 2019 at 11:15:27AM +0800, wenxu@ucloud.cn wrote:
> diff --git a/net/netfilter/nf_tables_offload.c b/net/netfilter/nf_tables_offload.c
> index 113ac40..ca9e0cb 100644
> --- a/net/netfilter/nf_tables_offload.c
> +++ b/net/netfilter/nf_tables_offload.c
> @@ -357,11 +357,12 @@ static void nft_indr_block_cb(struct net_device *dev,
> const struct nft_table *table;
> const struct nft_chain *chain;
>
> - list_for_each_entry_rcu(table, &net->nft.tables, list) {
> + mutex_lock(&net->nft.commit_mutex);
> + list_for_each_entry(table, &net->nft.tables, list) {
> if (table->family != NFPROTO_NETDEV)
> continue;
>
> - list_for_each_entry_rcu(chain, &table->chains, list) {
> + list_for_each_entry(chain, &table->chains, list) {
> if (!nft_is_base_chain(chain))
> continue;
nft_indr_block_cb() does not check for the offload flag in the
basechain...
next prev parent reply other threads:[~2019-09-03 20:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 3:15 [PATCH nf-next v3] netfilter: nf_table_offload: Fix the incorrect rcu usage in nft_indr_block_cb wenxu
2019-09-03 17:27 ` Pablo Neira Ayuso
2019-09-03 20:06 ` Pablo Neira Ayuso [this message]
2019-09-03 23:16 ` wenxu
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=20190903200649.vmc5mh56dz3f3jlo@salvia \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=wenxu@ucloud.cn \
/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).