From: Hans Schillstrom <hans.schillstrom@ericsson.com>
To: <horms@verge.net.au>, <ja@ssi.bg>, <wensong@linux-vs.org>,
<lvs-devel@vger.kernel.org>, <netdev@vger.kernel.org>,
<netfilter-devel@vger.kernel.org>
Cc: <hans@schillstrom.com>, Hans Schillstrom <hans.schillstrom@ericsson.com>
Subject: [PATCH 1/2] fix lockdep warning
Date: Mon, 3 Oct 2011 12:56:38 +0200 [thread overview]
Message-ID: <1317639399-4522-1-git-send-email-hans.schillstrom@ericsson.com> (raw)
From: Hans Schillstrom <hans@schillstrom.com>
rs_lock needs a key to make lock dep happy.
Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index 2b771dc..a1af72f 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -57,6 +57,7 @@ static DEFINE_MUTEX(__ip_vs_mutex);
/* lock for service table */
static DEFINE_RWLOCK(__ip_vs_svc_lock);
+static struct lock_class_key ip_vs_rs_key;
/* sysctl variables */
@@ -3680,6 +3681,7 @@ int __net_init ip_vs_control_net_init(struct net *net)
struct netns_ipvs *ipvs = net_ipvs(net);
ipvs->rs_lock = __RW_LOCK_UNLOCKED(ipvs->rs_lock);
+ __rwlock_init(&ipvs->rs_lock, "ipvs->rs_lock", &ip_vs_rs_key);
/* Initialize rs_table */
for (idx = 0; idx < IP_VS_RTAB_SIZE; idx++)
--
1.7.4.4
next reply other threads:[~2011-10-03 10:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-03 10:56 Hans Schillstrom [this message]
2011-10-03 10:56 ` [PATCH 2/2] IPVS netns shutdown/startup dead-lock (Take II) Hans Schillstrom
2011-10-03 20:55 ` Julian Anastasov
2011-10-03 21:12 ` Hans Schillstrom
2011-10-04 21:14 ` [PATCH 1/2] fix lockdep warning Simon Horman
2011-10-04 22:51 ` Julian Anastasov
2011-10-05 6:31 ` Hans Schillstrom
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=1317639399-4522-1-git-send-email-hans.schillstrom@ericsson.com \
--to=hans.schillstrom@ericsson.com \
--cc=hans@schillstrom.com \
--cc=horms@verge.net.au \
--cc=ja@ssi.bg \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=wensong@linux-vs.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).