netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH nf-next 2/3] netfilter: nf_log: don't call synchronize_rcu in nf_log_unset
Date: Mon, 24 Apr 2017 15:37:40 +0200	[thread overview]
Message-ID: <20170424133741.2707-3-fw@strlen.de> (raw)
In-Reply-To: <20170424133741.2707-1-fw@strlen.de>

nf_log_unregister() (which is what gets called in the logger backends
module exit paths) does a (required, module is removed) synchronize_rcu().

But nf_log_unset() is only called from pernet exit handlers. It doesn't
free any memory so there appears to be no need to call synchronize_rcu.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 net/netfilter/nf_log.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index cc32727e3f32..8bb152a7cca4 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -71,7 +71,6 @@ void nf_log_unset(struct net *net, const struct nf_logger *logger)
 			RCU_INIT_POINTER(net->nf.nf_loggers[i], NULL);
 	}
 	mutex_unlock(&nf_log_mutex);
-	synchronize_rcu();
 }
 EXPORT_SYMBOL(nf_log_unset);
 
-- 
2.10.2


  parent reply	other threads:[~2017-04-24 13:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24 13:37 [PATCH nf-next 0/3] netfilter: speed up netns cleanup Florian Westphal
2017-04-24 13:37 ` [PATCH nf-next 1/3] netfilter: batch synchronize_net calls during hook unregister Florian Westphal
2017-04-24 13:37 ` Florian Westphal [this message]
2017-04-25  6:33   ` [PATCH nf-next 2/3] netfilter: nf_log: don't call synchronize_rcu in nf_log_unset Liping Zhang
2017-04-24 13:37 ` [PATCH nf-next 3/3] netfilter: nf_queue: only call synchronize_net twice if nf_queue is active Florian Westphal
2017-04-25  8:24 ` [PATCHo nf-next v2] netfilter: nf_log: don't call synchronize_rcu in nf_log_unset Florian Westphal
2017-05-01  9:20 ` [PATCH nf-next 0/3] netfilter: speed up netns cleanup Pablo Neira Ayuso
2017-05-01 19:37   ` Florian Westphal

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=20170424133741.2707-3-fw@strlen.de \
    --to=fw@strlen.de \
    --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).