public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Tom Parkin <tparkin@katalix.com>
Cc: David Miller <davem@davemloft.net>, netdev <netdev@vger.kernel.org>
Subject: Re: LOCKDEP complaints in l2tp_xmit_skb()
Date: Thu, 28 Jun 2012 13:22:31 +0200	[thread overview]
Message-ID: <1340882551.13187.96.camel@edumazet-glaptop> (raw)
In-Reply-To: <1340873862.13187.5.camel@edumazet-glaptop>

On Thu, 2012-06-28 at 10:57 +0200, Eric Dumazet wrote:
> On Thu, 2012-06-28 at 08:56 +0200, Eric Dumazet wrote:
> 
> > [PATCH] net: Qdisc busylock gets its own lockdep class
> > 
> > Tom Parkin reported following LOCKDEP splat :
> ..
> > 
> > Instruct lockdep that each Qdisc busylock is independant, or else
> > bonding or various tunnels can trigger a splat.
> > 
> > Reported-by: Tom Parkin <tparkin@katalix.com>
> > Signed-off-by: Eric Dumazet <edumazet@google.com>
> > ---
> 
> I reproduced the bug using a bond0 device, adding a qdisc on it,
> (one Qdisc on bond0, and a Qdisc on the slave too)
> 
> Problem with this patch is I have following message :
> 
> BUG: key ffff88..... not in .data!
> 
> No more LOCKDEP splat, but patch not good as is.

I tested the alternative following patch with my bonding setup,
could you test it with l2tp ?

 net/core/dev.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 6df2140..d265c67 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2412,13 +2412,13 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
 
 		qdisc_bstats_update(q, skb);
 
-		if (sch_direct_xmit(skb, q, dev, txq, root_lock)) {
-			if (unlikely(contended)) {
-				spin_unlock(&q->busylock);
-				contended = false;
-			}
+		if (unlikely(contended)) {
+			spin_unlock(&q->busylock);
+			contended = false;
+		}
+		if (sch_direct_xmit(skb, q, dev, txq, root_lock))
 			__qdisc_run(q);
-		} else
+		else
 			qdisc_run_end(q);
 
 		rc = NET_XMIT_SUCCESS;

  reply	other threads:[~2012-06-28 11:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27 11:11 LOCKDEP complaints in l2tp_xmit_skb() Tom Parkin
2012-06-28  6:56 ` Eric Dumazet
2012-06-28  8:57   ` Eric Dumazet
2012-06-28 11:22     ` Eric Dumazet [this message]
2012-06-28 14:33       ` Tom Parkin
2012-06-28 15:00         ` Eric Dumazet
2012-06-28 15:20           ` Tom Parkin
2012-06-28 15:23             ` 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=1340882551.13187.96.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=tparkin@katalix.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