netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: David Ahern <dsa@cumulusnetworks.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: circular locking dependency splat due to f9eb8aea2a1e
Date: Wed, 8 Jun 2016 13:30:21 -0700	[thread overview]
Message-ID: <CANn89iLquP-_fsFrSOUqxtg3YCYNuXgqO+TCYMcxc8foChB8jA@mail.gmail.com> (raw)
In-Reply-To: <471b265b-d938-fd3c-7de6-91cc232b4e2b@cumulusnetworks.com>

On Wed, Jun 8, 2016 at 11:17 AM, David Ahern <dsa@cumulusnetworks.com> wrote:
> Getting the below splat with ping in a VRF. git bisect points to:
>
> dsa@kenny:~/kernel-2.git$ git bisect good
> f9eb8aea2a1e12fc2f584d1627deeb957435a801 is the first bad commit
> commit f9eb8aea2a1e12fc2f584d1627deeb957435a801
> Author: Eric Dumazet <edumazet@google.com>
> Date:   Mon Jun 6 09:37:15 2016 -0700
>
>     net_sched: transform qdisc running bit into a seqcount
>
>     Instead of using a single bit (__QDISC___STATE_RUNNING)
>     in sch->__state, use a seqcount.
>
>     This adds lockdep support, but more importantly it will allow us
>     to sample qdisc/class statistics without having to grab qdisc root lock.
>
>     Signed-off-by: Eric Dumazet <edumazet@google.com>
>     Cc: Cong Wang <xiyou.wangcong@gmail.com>
>     Cc: Jamal Hadi Salim <jhs@mojatatu.com>
>     Signed-off-by: David S. Miller <davem@davemloft.net>
>
>
> [   49.036323] ======================================================
> [   49.038300] [ INFO: possible circular locking dependency detected ]
> [   49.040313] 4.7.0-rc1+ #252 Not tainted
> [   49.041502] -------------------------------------------------------
> [   49.043518] ping/2143 is trying to acquire lock:
> [

It looks VRF was already lacking annotation for busylock then ?

diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 1b214ea4619a5838d6478a2835f8e73da85bef78..3c1c414623196f2bd8bf99c1d84563a54b3f6822
100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -635,6 +635,9 @@ static void vrf_dev_uninit(struct net_device *dev)
        dev->dstats = NULL;
 }

+static struct lock_class_key vrf_tx_busylock;
+static struct lock_class_key vrf_qdisc_running_key;
+
 static int vrf_dev_init(struct net_device *dev)
 {
        struct net_vrf *vrf = netdev_priv(dev);
@@ -658,6 +661,8 @@ static int vrf_dev_init(struct net_device *dev)
        /* similarly, oper state is irrelevant; set to up to avoid confusion */
        dev->operstate = IF_OPER_UP;

+       dev->qdisc_tx_busylock = &vrf_tx_busylock;
+       dev->qdisc_running_key = &vrf_qdisc_running_key;
        return 0;

 out_rth:

  reply	other threads:[~2016-06-08 20:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08 18:17 circular locking dependency splat due to f9eb8aea2a1e David Ahern
2016-06-08 20:30 ` Eric Dumazet [this message]
2016-06-08 20:31   ` David Ahern
2016-06-08 20:32     ` Eric Dumazet
2016-06-08 20:59       ` David Ahern
2016-06-08 21:44         ` Eric Dumazet

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=CANn89iLquP-_fsFrSOUqxtg3YCYNuXgqO+TCYMcxc8foChB8jA@mail.gmail.com \
    --to=edumazet@google.com \
    --cc=dsa@cumulusnetworks.com \
    --cc=netdev@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).