From: pablo@netfilter.org
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 08/10] netfilter: nf_conntrack: remove unnecessary RTNL locking
Date: Thu, 23 Aug 2012 01:38:44 +0200 [thread overview]
Message-ID: <1345678726-3109-9-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1345678726-3109-1-git-send-email-pablo@netfilter.org>
From: Patrick McHardy <kaber@trash.net>
Locking the rtnl was added to nf_conntrack_l{3,4}_proto_unregister()
for walking the network namespace list. This is not done anymore since
we have proper namespace support in the protocols now, so we don't
need to take the RTNL anymore.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/nf_conntrack_proto.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/net/netfilter/nf_conntrack_proto.c b/net/netfilter/nf_conntrack_proto.c
index 0dc6385..51e928d 100644
--- a/net/netfilter/nf_conntrack_proto.c
+++ b/net/netfilter/nf_conntrack_proto.c
@@ -21,7 +21,6 @@
#include <linux/notifier.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
-#include <linux/rtnetlink.h>
#include <net/netfilter/nf_conntrack.h>
#include <net/netfilter/nf_conntrack_l3proto.h>
@@ -294,9 +293,7 @@ void nf_conntrack_l3proto_unregister(struct net *net,
nf_ct_l3proto_unregister_sysctl(net, proto);
/* Remove all contrack entries for this protocol */
- rtnl_lock();
nf_ct_iterate_cleanup(net, kill_l3proto, proto);
- rtnl_unlock();
}
EXPORT_SYMBOL_GPL(nf_conntrack_l3proto_unregister);
@@ -502,9 +499,7 @@ void nf_conntrack_l4proto_unregister(struct net *net,
nf_ct_l4proto_unregister_sysctl(net, pn, l4proto);
/* Remove all contrack entries for this protocol */
- rtnl_lock();
nf_ct_iterate_cleanup(net, kill_l4proto, l4proto);
- rtnl_unlock();
}
EXPORT_SYMBOL_GPL(nf_conntrack_l4proto_unregister);
--
1.7.10.4
next prev parent reply other threads:[~2012-08-22 23:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-22 23:38 [PATCH 00/10] netfilter updates for net-next (batch 1) pablo
2012-08-22 23:38 ` [PATCH 01/10] ipvs: ip_vs_ftp depends on nf_conntrack_ftp helper pablo
2012-08-22 23:38 ` [PATCH 02/10] ipvs: generalize app registration in netns pablo
2012-08-22 23:38 ` [PATCH 03/10] ipvs: fixed sparse warning pablo
2012-08-22 23:38 ` [PATCH 04/10] ipvs: implement passive PMTUD for IPIP packets pablo
2012-08-22 23:38 ` [PATCH 05/10] ipvs: add pmtu_disc option to disable IP DF for TUN packets pablo
2012-08-22 23:38 ` [PATCH 06/10] netfilter: PTR_RET can be used pablo
2012-08-22 23:38 ` [PATCH 07/10] netfilter: sparse endian fixes pablo
2012-08-22 23:38 ` pablo [this message]
2012-08-22 23:38 ` [PATCH 09/10] netfilter: replace list_for_each_continue_rcu with new interface pablo
2012-08-22 23:38 ` [PATCH 10/10] netfilter: remove unnecessary goto statement for error recovery pablo
2012-08-23 2:10 ` [PATCH 00/10] netfilter updates for net-next (batch 1) 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=1345678726-3109-9-git-send-email-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).