netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@o2.pl>
To: David Miller <davem@davemloft.net>
Cc: akpm@linux-foundation.org, netdev@vger.kernel.org,
	jura@netams.com, paulus@samba.org
Subject: Re: [patch 10/15] ppp_generic: fix lockdep warning
Date: Thu, 26 Apr 2007 12:49:50 +0200	[thread overview]
Message-ID: <20070426104950.GA3145@ff.dom.local> (raw)
In-Reply-To: <20070426.013911.69219176.davem@davemloft.net>

On Thu, Apr 26, 2007 at 01:39:11AM -0700, David Miller wrote:
> From: akpm@linux-foundation.org
> Date: Thu, 26 Apr 2007 00:27:29 -0700
> 
> > lockdep has seen locks "-> #0" - "-> #3" taken in circular order, but IMHO,
> > lock "-> #3" (&pch->downl) taken after "-> #2" (&ppp->wlock) differs from
> > &pch->downl lock taken in "-> #0" (before &vlan_netdev_xmit_lock_key) and
> > lockdep should be notified about this.
> > 
> > Reported & tested by: "Yuriy N. Shkandybin" <jura@netams.com>
> > Signed-off-by: Jarek Poplawski <jarkao2@o2.pl>
> > Cc: Paul Mackerras <paulus@samba.org>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> 
> I believe there were some problems found in this one,
> so I'm going to hold on it for now.
> 

This patch should prevent lockdep from reporting one kind
of possible circular locking error, which in my opinion is
impossible (lockdep doesn't see the difference in serving
two types of ppp channels). So, if I'm not wrong, this
patch is helpful sometime.

But there is also a second, very similar lockdep report,
probably also false (lockdep cannot see the difference
between locks of two different, I hope, vlan devices),
which needs more work:
a) vlan should use different lockdep lock subclasses or
classes for each device, which would require quite a lot
of static memory reserved, probably only to silence
lockdep,
b) pppoe could change the way of sending packets, so
the locks of ppp_generic were not seen by lockdep
with so many variants; I'm not sure the maintainer of
pppoe likes this idea;

Doing a) should be enough, I guess; doing b) is easier
but, probably, the similar is possible elsewhere, too.

Of course, there is possibility to silence lockdep
easier, e.g. don't let it know about vlan's lock
at all, but there is always, a risk lockdep reports
could be right sometimes...

Probably this kind of "error" reports could be avoided,
if vlan's config were started after all their devices
were up. Here it is probably: netdev1, vlan1, netdev2,
vlan2... and lockdep isn't able to distinguish them
enough.

Currently I think about some change in lockdep, to track
something like different vlans with less memory, but I'm
not sure it'll work, yet.

Regards,
Jarek P.

  reply	other threads:[~2007-04-26 10:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-26  7:27 [patch 10/15] ppp_generic: fix lockdep warning akpm
2007-04-26  8:39 ` David Miller
2007-04-26 10:49   ` Jarek Poplawski [this message]
2007-05-09  9:35     ` [PATCH] vlan: lockdep subclass for ppp _xmit_lock " Jarek Poplawski
2007-05-09  9:32       ` David Miller
2007-05-09 13:13         ` [PATCH (take 2)] vlan: lockdep class " Jarek Poplawski
2007-05-09 20:06       ` [PATCH] vlan: lockdep subclass " Yuriy N. Shkandybin
2007-05-10  5:30         ` Jarek Poplawski
2007-05-10  6:03           ` Yuriy N. Shkandybin
2007-05-10  6:39             ` Jarek Poplawski
2007-05-11  7:00         ` [PATCH] ppp_generic: lockdep class " Jarek Poplawski
2007-04-26 10:04 ` [patch 10/15] " Paul Mackerras
2007-04-26 11:28   ` Jarek Poplawski

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=20070426104950.GA3145@ff.dom.local \
    --to=jarkao2@o2.pl \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=jura@netams.com \
    --cc=netdev@vger.kernel.org \
    --cc=paulus@samba.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).