From: Johannes Berg <johannes@sipsolutions.net>
To: Hugh Dickins <hughd@google.com>
Cc: Ding Tianhong <dingtianhong@huawei.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Greg KH <gregkh@linuxfoundation.org>,
"David S. Miller" <davem@davemloft.net>,
"Otcheretianski, Andrei" <andrei.otcheretianski@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
Pravin B Shelar <pshelar@nicira.com>, Thomas Graf <tgraf@suug.ch>
Subject: Re: 3.11-rc6 genetlink locking fix offends lockdep
Date: Tue, 20 Aug 2013 21:10:13 +0200 [thread overview]
Message-ID: <1377025813.13829.22.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1377025368.13829.21.camel@jlt4.sipsolutions.net>
On Tue, 2013-08-20 at 21:02 +0200, Johannes Berg wrote:
> On Tue, 2013-08-20 at 10:28 +0200, Johannes Berg wrote:
>
> > The only way to fix this that I see right now (that doesn't rewrite the
> > locking completely) would be to make genetlink use parallel_ops itself,
> > thereby removing the genl_lock() in genl_rcv_msg() and breaking all
> > those lock chains that lockdep reported. After that, it should be safe
> > to use genl_lock() inside all the operations. Something like the patch
> > below, perhaps? Completely untested so far.
>
> Tested now, and it still causes lockdep to complain, though that's a
> lockdep issue I believe, it thinks that genl_mutex and nlk->cb_mutex can
> be inverted although nlk->cb_mutex exists per family, so we need to
> annotate lockdep there.
No, lockdep is correct - generic netlink uses the same cb_mutex for all
families, obviously, since it's all the same netlink family.
I'll just convert it to RCU.
johannes
prev parent reply other threads:[~2013-08-20 19:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 5:04 3.11-rc6 genetlink locking fix offends lockdep Hugh Dickins
2013-08-19 8:00 ` Johannes Berg
2013-08-19 11:00 ` Ding Tianhong
2013-08-19 11:22 ` Johannes Berg
2013-08-19 18:52 ` Hugh Dickins
2013-08-20 8:28 ` Johannes Berg
2013-08-20 9:04 ` Borislav Petkov
2013-08-20 15:49 ` Hugh Dickins
2013-08-20 19:02 ` Johannes Berg
2013-08-20 19:10 ` Johannes Berg [this message]
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=1377025813.13829.22.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=andrei.otcheretianski@intel.com \
--cc=davem@davemloft.net \
--cc=dingtianhong@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.com \
--cc=stable@vger.kernel.org \
--cc=tgraf@suug.ch \
--cc=torvalds@linux-foundation.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).