netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Jarek Poplawski <jarkao2@gmail.com>
Cc: netdev@vger.kernel.org, bugme-daemon@bugzilla.kernel.org,
	marcus@better.se,
	Stephen Hemminger <shemminger@linux-foundation.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [Bugme-new] [Bug 10326] New: inconsistent lock state in net_rx_action
Date: Thu, 27 Mar 2008 02:18:12 -0700	[thread overview]
Message-ID: <20080327021812.601776b8.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080327085542.GA2778@ami.dom.local>

On Thu, 27 Mar 2008 09:55:42 +0100 Jarek Poplawski <jarkao2@gmail.com> wrote:

> On Wed, Mar 26, 2008 at 05:14:03PM -0700, Andrew Morton wrote:
> ...
> > > >> http://bugzilla.kernel.org/show_bug.cgi?id=10326
> ...
> > No, it's not an irq_disable() thing, directly.
> > 
> > What lockdep is saying is that sky2_poll() is taking napi->poll_lock for
> > writing with softirqs enabled, but net_rx_action() takes the same lock from
> > within softirq context.
> > 
> > If sky2_poll() always takes napi->poll_lock under local_irq_disable() then
> > that would be a lockdep bug.
> 
> sky2_poll() doesn't take napi->poll_lock; this lock is taken by
> netpoll_poll() before calling sky2_poll(). And before this hardirqs
> are disabled in write_msg(). So, theoretically lockdep could be right
> if sky2_poll() would enable irqs after this. (If it were done in
> netpoll - lockdep should warn before or after sky2_poll() call.)
> But I really can't see any such possibility in sky2_poll().

I can't spot it from a five-minute read either.  gcc's autoinlining really
makes this sort of thing much harder than it used to be :(

Anyway, the accusation is that lockdep is busted, in that it doesn't realise that
local_irq_disable() blocks softirqs.

I bet the net code is wrong and we missed it ;)

  parent reply	other threads:[~2008-03-27  9:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-10326-10286@http.bugzilla.kernel.org/>
2008-03-25 20:43 ` [Bugme-new] [Bug 10326] New: inconsistent lock state in net_rx_action Andrew Morton
2008-03-26 23:13   ` Jarek Poplawski
2008-03-27  0:14     ` Andrew Morton
2008-03-27  8:55       ` Jarek Poplawski
2008-03-27  9:08         ` Jarek Poplawski
2008-03-27  9:18         ` Andrew Morton [this message]
2008-03-27 10:07           ` Jarek Poplawski
2008-03-27 10:56           ` Peter Zijlstra
2008-03-27 11:03             ` David Miller
2008-03-27 11:59               ` Marcus Better
2008-03-27 12:32                 ` Jarek Poplawski
2008-03-27 21:44                   ` David Miller
2008-03-27 12:22             ` Jarek Poplawski
2008-03-27 12:30               ` Peter Zijlstra
2008-03-27 12:49                 ` Jarek Poplawski
2008-03-27 21:56                   ` Rafael J. Wysocki
2008-03-27 22:22                     ` Jarek Poplawski
2008-03-27 22:22                       ` David Miller
2008-03-27 22:39                         ` Jarek Poplawski
2008-03-28  0:59                           ` David Miller
2008-03-28 10:12                             ` Peter Zijlstra

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=20080327021812.601776b8.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=jarkao2@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcus@better.se \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=shemminger@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;
as well as URLs for NNTP newsgroup(s).