From patchwork Mon Nov 21 23:17:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Waskiewicz Jr, Peter P" X-Patchwork-Id: 126965 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.180.67]) by ozlabs.org (Postfix) with ESMTP id C82C2B71E7 for ; Tue, 22 Nov 2011 10:28:44 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754305Ab1KUX2U (ORCPT ); Mon, 21 Nov 2011 18:28:20 -0500 Received: from mga03.intel.com ([143.182.124.21]:23098 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753523Ab1KUX2T (ORCPT ); Mon, 21 Nov 2011 18:28:19 -0500 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 21 Nov 2011 15:28:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.69,550,1315206000"; d="scan'208";a="77746365" Received: from pjaxe.jf.intel.com (HELO [134.134.176.157]) ([134.134.176.157]) by azsmga001.ch.intel.com with ESMTP; 21 Nov 2011 15:28:18 -0800 Subject: Re: softirq oops from b44_poll From: Peter P Waskiewicz Jr To: Xander Hover Cc: "linux-kernel@vger.kernel.org" , netdev@vger.kernel.org In-Reply-To: References: Date: Mon, 21 Nov 2011 15:17:33 -0800 Message-ID: <1321917453.10276.3.camel@pjaxe> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 (2.32.2-1.fc14) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, 2011-11-21 at 05:58 -0800, Xander Hover wrote: > Hi all, > > I noticed the small discussion about the b44_poll OOPS and > I also have a uni-processor PC with a broadcom network device (b44) > that causes similar kernel OOPSes. > > Here is a (reproducible) trace that still shows up in kernel 3.1.1: > > ------------[ cut here ]------------ > WARNING: at kernel/softirq.c:159 local_bh_enable+0x32/0x79() > Hardware name: Dimension 2400 > Modules linked in: snd_seq_midi snd_emu10k1_synth snd_emux_synth > snd_seq_virmidi snd_seq_midi_emul snd_seq_oss snd_seq_midi_event > snd_seq snd_pcm_oss snd_mixer_oss bnep rfcomm cryptd aes_i586 > aes_generic ecb btusb bluetooth rfkill ppdev snd_emu10k1 snd_rawmidi > snd_ac97_codec ac97_bus snd_pcm snd_seq_device snd_timer > snd_page_alloc dcdbas snd_util_mem parport_pc snd_hwdep snd parport > emu10k1_gp rtc_cmos gameport i2c_i801 > Pid: 0, comm: swapper Not tainted 3.1.1-gentoo #1 > Call Trace: > [] warn_slowpath_common+0x65/0x7a > [] ? local_bh_enable+0x32/0x79 > [] warn_slowpath_null+0xf/0x13 > [] local_bh_enable+0x32/0x79 > [] destroy_conntrack+0x7c/0x9b > [] nf_conntrack_destroy+0x1f/0x26 > [] skb_release_head_state+0x74/0x83 > [] __kfree_skb+0xb/0x6b > [] consume_skb+0x24/0x26 > [] b44_poll+0xaa/0x449 > [] net_rx_action+0x3f/0xea > [] __do_softirq+0x5f/0xd5 > [] ? local_bh_enable+0x79/0x79 > [] ? irq_exit+0x34/0x8d > [] ? do_IRQ+0x74/0x87 > [] ? common_interrupt+0x29/0x30 > [] ? default_idle+0x29/0x3e > [] ? cpu_idle+0x2f/0x5d > [] ? rest_init+0x79/0x7b > [] ? start_kernel+0x297/0x29c > [] ? i386_start_kernel+0xb0/0xb7 > ---[ end trace 583f33bb1aa207a9 ]--- > > > However if I apply the following patch this error does not show up anymore: > > > diff --git a/drivers/net/ethernet/broadcom/b44.c > b/drivers/net/ethernet/broadcom/b44.c > index 4cf835d..3fb66d0 100644 > --- a/drivers/net/ethernet/broadcom/b44.c > +++ b/drivers/net/ethernet/broadcom/b44.c > @@ -608,7 +608,7 @@ static void b44_tx(struct b44 *bp) > skb->len, > DMA_TO_DEVICE); > rp->skb = NULL; > - dev_kfree_skb(skb); > + dev_kfree_skb_irq(skb); I suspect the "right" way to fix this is to call dev_kfree_skb_any(skb); instead, since that will handle the in-interrupt case if that's where we're stuck. Can you try this patch (compile-tested only) and see if fixes the issue you're seeing: commit e36ef2c1a2b6b517ed43254eb89768794a049b1c Author: Peter P Waskiewicz Jr Date: Mon Nov 21 15:14:18 2011 -0800 b44: Use dev_kfree_skb_any() in b44_tx() Reported issues when using dev_kfree_skb() on UP systems and systems with low numbers of cores. dev_kfree_skb_any() will properly save IRQ state before freeing the skb, depending on how b44_tx() is invoked. Signed-off-by: Peter P Waskiewicz Jr --- drivers/net/ethernet/broadcom/b44.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- 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/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c index 4cf835d..6a7c39b 100644 --- a/drivers/net/ethernet/broadcom/b44.c +++ b/drivers/net/ethernet/broadcom/b44.c @@ -608,7 +608,7 @@ static void b44_tx(struct b44 *bp) skb->len, DMA_TO_DEVICE); rp->skb = NULL; - dev_kfree_skb(skb); + dev_kfree_skb_any(skb); } bp->tx_cons = cons;