From: Johannes Berg <johannes@sipsolutions.net>
To: Ding Tianhong <dingtianhong@huawei.com>
Cc: Hugh Dickins <hughd@google.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: Mon, 19 Aug 2013 13:22:42 +0200 [thread overview]
Message-ID: <1376911362.14734.11.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <5211FAB3.7080400@huawei.com>
On Mon, 2013-08-19 at 19:00 +0800, Ding Tianhong wrote:
> On 2013/8/19 16:00, Johannes Berg wrote:
> >
> >> 3.11-rc6's commit 58ad436fcf49 ("genetlink: fix family dump race")
> >> gives me the lockdep trace below at startup.
> >
> > Hmm. Yes, I see now how this happens, not sure why I didn't run into it.
> >
> > The problem is that genl_family_rcv_msg() is called with the genl_lock
> > held, and then calls netlink_dump_start() with it held, creating a
> > genl_lock->cb_mutex dependency, but obviously the dump continuation is
> > the other way around.
> >
> > We could use the semaphore instead, I believe, but I don't really
> > understand the mutex vs. semaphore well enough to be sure that's
> > correct.
> >
> > johannes
> >
> it is useless, the logic need to modify or otherwise it will still call lockdep trace.
I don't believe so, the semaphore and cb_mutex don't have a dependency
yet, afaict.
> maybe i could send a patch for it, if you wish.
What do you mean?
johannes
next prev parent reply other threads:[~2013-08-19 11:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 5:04 Hugh Dickins
2013-08-19 8:00 ` Johannes Berg
2013-08-19 11:00 ` Ding Tianhong
2013-08-19 11:22 ` Johannes Berg [this message]
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
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=1376911362.14734.11.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
Powered by JetHome