From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756488Ab0COKlK (ORCPT ); Mon, 15 Mar 2010 06:41:10 -0400 Received: from mail-bw0-f209.google.com ([209.85.218.209]:34030 "EHLO mail-bw0-f209.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751173Ab0COKlI (ORCPT ); Mon, 15 Mar 2010 06:41:08 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=Nqk949N6VOO+/zUr8WkUcIFCVoUEpxSOrAS1l1JntS7iZ7FKgCsVvEpOQ7+sr8x2XW z+uAKlwKxmkaCJyZ9+GhbQHfj8njh1c/m5Knn65fk+PdtNlECYbAt4XIr1mQtDez7ugx ZE8xblY7QUJNMSMN+O+xz9MqYceFR05Deu9jU= Subject: Re: 2.6.34-rc1: rcu lockdep bug? From: Eric Dumazet To: =?ISO-8859-1?Q?Am=E9rico?= Wang Cc: "Paul E. McKenney" , David Miller , peterz@infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org In-Reply-To: <2375c9f91003150312u37dfd70fk55a4b8820e13590e@mail.gmail.com> References: <20100311134556.GA6344@linux.vnet.ibm.com> <1268392276.3141.4.camel@edumazet-laptop> <2375c9f91003120511j6f33592cl12cb2617a27351ec@mail.gmail.com> <1268401058.3141.9.camel@edumazet-laptop> <20100313053356.GC3704@hack> <20100313215838.GB6805@linux.vnet.ibm.com> <20100315010802.GB2735@hack> <2375c9f91003142010g61841666iad53c24f39036acf@mail.gmail.com> <2375c9f91003150239m1abc765bh59eb51c948eed592@mail.gmail.com> <1268647460.3154.1.camel@edumazet-laptop> <2375c9f91003150312u37dfd70fk55a4b8820e13590e@mail.gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Mon, 15 Mar 2010 11:41:03 +0100 Message-ID: <1268649663.3154.9.camel@edumazet-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le lundi 15 mars 2010 à 18:12 +0800, Américo Wang a écrit : > On Mon, Mar 15, 2010 at 6:04 PM, Eric Dumazet 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. I dont see what could be the problem, is it reproductible with vanilla kernel ?