netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Taehee Yoo <ap420073@gmail.com>
Cc: ja@ssi.bg, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH V2] netfilter: Remove duplicated rcu_read_lock.
Date: Mon, 19 Jun 2017 20:04:49 +0200	[thread overview]
Message-ID: <20170619180449.GA19139@salvia> (raw)
In-Reply-To: <20170605152125.24978-1-ap420073@gmail.com>

On Tue, Jun 06, 2017 at 12:21:25AM +0900, Taehee Yoo wrote:
> diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
> index 8a0f218..bb27e99 100644
> --- a/net/netfilter/nfnetlink_queue.c
> +++ b/net/netfilter/nfnetlink_queue.c
> @@ -928,7 +928,6 @@ static unsigned int nfqnl_nf_hook_drop(struct net *net)
>  	unsigned int instances = 0;
>  	int i;
>  
> -	rcu_read_lock();
>  	for (i = 0; i < INSTANCE_BUCKETS; i++) {
>  		struct nfqnl_instance *inst;
>  		struct hlist_head *head = &q->instance_table[i];
> @@ -938,7 +937,6 @@ static unsigned int nfqnl_nf_hook_drop(struct net *net)
>  			instances++;
>  		}
>  	}
> -	rcu_read_unlock();
>  
>  	return instances;
>  }

This is called from nfqnl_rcv_dev_event(), are you sure we can get rid
of this rcu read lock ?

  parent reply	other threads:[~2017-06-19 18:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05 15:21 [PATCH V2] netfilter: Remove duplicated rcu_read_lock Taehee Yoo
2017-06-05 18:59 ` Julian Anastasov
2017-06-19 18:04 ` Pablo Neira Ayuso [this message]
2017-06-20 15:32   ` Taehee Yoo
2017-06-19 18:20 ` Pablo Neira Ayuso

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=20170619180449.GA19139@salvia \
    --to=pablo@netfilter.org \
    --cc=ap420073@gmail.com \
    --cc=ja@ssi.bg \
    --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).