linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: Lockdep rtnl_mutex and genl_mutex circular dependency
Date: Mon, 23 Feb 2009 22:35:52 -0800	[thread overview]
Message-ID: <1235457352.4455.94.camel@johannes.local> (raw)
In-Reply-To: <20090220023144.GE4740@tesla> (sfid-20090220_033236_226088_BAC87115)

[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]

On Thu, 2009-02-19 at 18:31 -0800, Luis R. Rodriguez wrote:
> Just running 'iw list' a few times I got this. I have a few patches on
> top of wl, but this doesn't seem to be related to those.

I see what's going on, it's the genetlink change, the code is:

        if (nlh->nlmsg_flags & NLM_F_DUMP) {
                if (ops->dumpit == NULL)
                        return -EOPNOTSUPP;

                genl_unlock();
                err = 0;
                if (family->pre_dumpit)
                        err = family->pre_dumpit();
                if (!err)
                        err = netlink_dump_start(genl_sock, skb, nlh,
                                                 ops->dumpit, ops->done);
                if (family->post_dumpit)
                        family->post_dumpit();
                genl_lock();  
                return err;
        }

pre_dumpit does rtnl_lock(), and netlink_dump_start() will re-do
genl_lock(), so here we end up with a dependency of rtnl -> genl. But
in the non-dump path, we do the pre_doit() with genl held, getting
genl -> rtnl. We thus have to change the genetlink change, patch coming
in a minute.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2009-02-24  6:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20  2:31 Lockdep rtnl_mutex and genl_mutex circular dependency Luis R. Rodriguez
2009-02-24  6:35 ` Johannes Berg [this message]
2009-02-24  7:03   ` 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=1235457352.4455.94.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lrodriguez@atheros.com \
    /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).