From: "Américo Wang" <xiyou.wangcong@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
David Miller <davem@davemloft.net>,
peterz@infradead.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: 2.6.34-rc1: rcu lockdep bug?
Date: Tue, 16 Mar 2010 18:26:26 +0800 [thread overview]
Message-ID: <2375c9f91003160326j4a088701y9f0b923a9776a39e@mail.gmail.com> (raw)
In-Reply-To: <1268649663.3154.9.camel@edumazet-laptop>
On Mon, Mar 15, 2010 at 6:41 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le lundi 15 mars 2010 à 18:12 +0800, Américo Wang a écrit :
>> On Mon, Mar 15, 2010 at 6:04 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> > Le lundi 15 mars 2010 à 17:39 +0800, Américo Wang a écrit :
>> >
>> >>
>> >> Ok, I think I found what lockdep really complains about, it is that we took
>> >> spin_lock in netpoll_poll_lock() which is in hardirq-enabled environment,
>> >> later, we took another spin_lock with spin_lock_irqsave() in netpoll_rx(),
>> >> so lockdep thought we broke the locking rule.
>> >>
>> >> I don't know why netpoll_rx() needs irq disabled, it looks like that no one
>> >> takes rx_lock in hardirq context. So can we use spin_lock(&rx_lock)
>> >> instead? Or am I missing something here? Eric? David?
>> >
>> > I am a bit lost.
>> >
>> > Could you give the complete picture, because I cannot find it in my
>> > netdev archives.
>> >
>>
>> Sure, sorry for this.
>>
>> Here is the whole thread:
>>
>> http://lkml.org/lkml/2010/3/11/100
>
> OK thanks
>
> netpoll_rx() can be called from hard irqs (netif_rx()), so rx_lock
> definitly needs irq care.
>
> netpoll_poll_lock() does take a spinlock with irq enabled, but its not
> rx_lock, its napi->poll_lock.
Yeah, I knew, but besides rcu locks, these two locks are the only
locks that can be taken in the call chain. I suspect lockdep got
something wrong.
>
> I dont see what could be the problem, is it reproductible with vanilla
> kernel ?
>
No. I don't know why, my patch doesn't touch any function in the
call chain.
I already "fix" this in another way, so no need to worry this any more.
Thanks for your help!
next prev parent reply other threads:[~2010-03-16 10:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2375c9f91003110205v1d7f00bfk89472cb11bd985d3@mail.gmail.com>
[not found] ` <20100311134556.GA6344@linux.vnet.ibm.com>
[not found] ` <20100311161751.GA3804@hack>
2010-03-12 7:56 ` 2.6.34-rc1: rcu lockdep bug? Américo Wang
2010-03-12 8:07 ` David Miller
2010-03-12 8:59 ` Américo Wang
2010-03-12 11:11 ` Eric Dumazet
2010-03-12 13:11 ` Américo Wang
2010-03-12 13:37 ` Eric Dumazet
2010-03-13 5:33 ` Américo Wang
2010-03-13 21:58 ` Paul E. McKenney
2010-03-15 1:08 ` Américo Wang
2010-03-15 3:10 ` Américo Wang
2010-03-15 9:39 ` Américo Wang
2010-03-15 10:04 ` Eric Dumazet
2010-03-15 10:12 ` Américo Wang
2010-03-15 10:41 ` Eric Dumazet
2010-03-16 10:26 ` Américo Wang [this message]
2010-03-12 22:03 ` Paul E. McKenney
2010-03-13 5:31 ` Américo Wang
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=2375c9f91003160326j4a088701y9f0b923a9776a39e@mail.gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.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).