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: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] netfilter: nat: remove rcu_read_lock in __nf_nat_decode_session.
Date: Thu, 6 Apr 2017 21:51:25 +0200	[thread overview]
Message-ID: <20170406195125.GA6515@salvia> (raw)
In-Reply-To: <20170327152850.19812-1-ap420073@gmail.com>

On Tue, Mar 28, 2017 at 12:28:50AM +0900, Taehee Yoo wrote:
> __nf_nat_decode_session is called from nf_nat_decode_session as decodefn.
> before calling decodefn, it already set rcu_read_lock. so rcu_read_lock in
> __nf_nat_decode_session can be removed.

Could you have close look at the tree to confirm if we have more spots
where rcu_read_lock is unnecessary?

$ git grep rcu_read_lock net/netfilter/ | wc -l
158
$ git grep rcu_read_lock
net/ipv4/netfilter/ | wc -l
3
$ git grep rcu_read_lock
net/ipv6/netfilter/ | wc -l
2
$ git grep rcu_read_lock
net/bridge/netfilter/ | wc -l

It's a fair good amount, it would take me around one hour probably to
evaluate those here.

If you can help us on verifying this, it would be simply great.

Thanks!

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-27 15:28 [PATCH] netfilter: nat: remove rcu_read_lock in __nf_nat_decode_session Taehee Yoo
2017-04-06 19:51 ` Pablo Neira Ayuso [this message]
2017-04-10 12:30   ` Taehee Yoo
2017-04-13 20:49 ` 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=20170406195125.GA6515@salvia \
    --to=pablo@netfilter.org \
    --cc=ap420073@gmail.com \
    --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).