From patchwork Thu Apr 9 08:08:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Miller X-Patchwork-Id: 25774 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 99EBDDE10D for ; Thu, 9 Apr 2009 18:09:01 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757599AbZDIII4 (ORCPT ); Thu, 9 Apr 2009 04:08:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756145AbZDIIIz (ORCPT ); Thu, 9 Apr 2009 04:08:55 -0400 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:43486 "EHLO sunset.davemloft.net" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1754494AbZDIIIv (ORCPT ); Thu, 9 Apr 2009 04:08:51 -0400 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id 5ECB535C4AC; Thu, 9 Apr 2009 01:08:42 -0700 (PDT) Date: Thu, 09 Apr 2009 01:08:42 -0700 (PDT) Message-Id: <20090409.010842.56147646.davem@davemloft.net> To: a.beregalov@gmail.com Cc: kernel-testers@vger.kernel.org, netdev@vger.kernel.org, e1000-devel@lists.sourceforge.net Subject: Re: 2.6.30-rc1: e1000: list_add corruption From: David Miller In-Reply-To: References: X-Mailer: Mew version 6.2.51 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Alexander Beregalov Date: Thu, 9 Apr 2009 07:45:39 +0400 > WARNING: at lib/list_debug.c:30 __list_add+0x89/0x90() > Hardware name: > list_add corruption. prev->next should be next (c06ea834), but was > f70244c8. (prev=c06ea834). > Modules linked in: w83627hf hwmon_vid i2c_nforce2 > Pid: 1436, comm: portageq Not tainted 2.6.30-rc1 #1 > Call Trace: > [] warn_slowpath+0x73/0xd0 I'll push the following fix for this: forcedeth: Use napi_complete() not __napi_complete(). It's not enough that forcedeth's interrupts are disabled, local cpu interrupts have to unconditionally be off when we remove the device from the poll list. Based upon a crash report from Alexander Beregalov : WARNING: at lib/list_debug.c:30 __list_add+0x89/0x90() Hardware name: list_add corruption. prev->next should be next (c06ea834), but was f70244c8. (prev=c06ea834). Modules linked in: w83627hf hwmon_vid i2c_nforce2 Pid: 1436, comm: portageq Not tainted 2.6.30-rc1 #1 Call Trace: [] warn_slowpath+0x73/0xd0 [] ? __kfree_skb+0x38/0x90 [] ? tcp_data_snd_check+0x26/0xe0 [] ? tcp_rcv_established+0x2bf/0x5e0 [] ? tcp_v4_rcv+0x47a/0x610 [] ? print_lock_contention_bug+0x1d/0x110 [] ? _spin_unlock+0x27/0x50 [] ? tcp_v4_rcv+0x54b/0x610 [] __list_add+0x89/0x90 [] __napi_schedule+0x29/0x60 [] e1000_intr+0xbd/0x1a0 [] handle_IRQ_event+0x3e/0x120 [] handle_fasteoi_irq+0x60/0xd0 [] handle_irq+0x34/0x60 [] ? rcu_irq_enter+0x8/0x40 [] do_IRQ+0x39/0xa0 [] ? skb_release_head_state+0x2c/0x60 [] common_interrupt+0x2e/0x34 [] ? list_del+0x21/0x90 [] ? trace_hardirqs_on+0xb/0x10 [] __napi_complete+0x1a/0x30 [] nv_napi_poll+0xd1/0x5c0 [] ? trace_hardirqs_on+0xb/0x10 [] net_rx_action+0x106/0x1b0 [] __do_softirq+0x6f/0x100 [] ? _spin_unlock+0x27/0x50 [] ? handle_fasteoi_irq+0x88/0xd0 [] do_softirq+0x5d/0x70 [] irq_exit+0x7d/0xa0 [] do_IRQ+0x42/0xa0 [] ? do_softirq+0x47/0x70 [] common_interrupt+0x2e/0x34 Signed-off-by: David S. Miller --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index d374650..11d5db1 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -3745,14 +3745,14 @@ static int nv_napi_poll(struct napi_struct *napi, int budget) mod_timer(&np->nic_poll, jiffies + POLL_WAIT); } spin_unlock_irqrestore(&np->lock, flags); - __napi_complete(napi); + napi_complete(napi); return rx_work; } if (rx_work < budget) { /* re-enable interrupts (msix not enabled in napi) */ - __napi_complete(napi); + napi_complete(napi); writel(np->irqmask, base + NvRegIrqMask); }