[kernel/f15] Backport upstream fix for b44_poll oops (rhbz #741117)

Josh Boyer jwboyer at fedoraproject.org
Tue Dec 20 14:36:01 UTC 2011


commit 4c6625aa8f575ab0d65664b66716ba6fd34a9482
Author: Josh Boyer <jwboyer at redhat.com>
Date:   Tue Dec 20 09:17:31 2011 -0500

    Backport upstream fix for b44_poll oops (rhbz #741117)

 b44-Use-dev_kfree_skb_irq-in-b44_tx.patch |   62 +++++++++++++++++++++++++++++
 kernel.spec                               |    7 +++
 2 files changed, 69 insertions(+), 0 deletions(-)
---
diff --git a/b44-Use-dev_kfree_skb_irq-in-b44_tx.patch b/b44-Use-dev_kfree_skb_irq-in-b44_tx.patch
new file mode 100644
index 0000000..ff50bd5
--- /dev/null
+++ b/b44-Use-dev_kfree_skb_irq-in-b44_tx.patch
@@ -0,0 +1,62 @@
+From 15ac2b08a2fd0f4aacbe8ae39788252fea6fbe63 Mon Sep 17 00:00:00 2001
+From: Xander Hover <LKML at hover.be>
+Date: Wed, 23 Nov 2011 16:40:31 -0500
+Subject: [PATCH] b44: Use dev_kfree_skb_irq() in b44_tx()
+
+Reported issues when using dev_kfree_skb() on UP systems and
+systems with low numbers of cores.  dev_kfree_skb_irq() will
+properly save IRQ state before freeing the skb.
+
+Tested on 3.1.1 and 3.2_rc2
+
+Example of reproducible trace of kernel 3.1.1
+------------[ cut here ]------------
+   WARNING: at kernel/softirq.c:159 local_bh_enable+0x32/0x79()
+   ...
+   Pid: 0, comm: swapper Not tainted 3.1.1-gentoo #1
+   Call Trace:
+    [<c1022970>] warn_slowpath_common+0x65/0x7a
+    [<c102699e>] ? local_bh_enable+0x32/0x79
+    [<c1022994>] warn_slowpath_null+0xf/0x13
+    [<c102699e>] local_bh_enable+0x32/0x79
+    [<c134bfd8>] destroy_conntrack+0x7c/0x9b
+    [<c134890b>] nf_conntrack_destroy+0x1f/0x26
+    [<c132e3a6>] skb_release_head_state+0x74/0x83
+    [<c132e286>] __kfree_skb+0xb/0x6b
+    [<c132e30a>] consume_skb+0x24/0x26
+    [<c127c925>] b44_poll+0xaa/0x449
+    [<c1333ca1>] net_rx_action+0x3f/0xea
+    [<c1026a44>] __do_softirq+0x5f/0xd5
+    [<c10269e5>] ? local_bh_enable+0x79/0x79
+    <IRQ>  [<c1026c32>] ? irq_exit+0x34/0x8d
+    [<c1003628>] ? do_IRQ+0x74/0x87
+    [<c13f5329>] ? common_interrupt+0x29/0x30
+    [<c1006e18>] ? default_idle+0x29/0x3e
+    [<c10015a7>] ? cpu_idle+0x2f/0x5d
+    [<c13e91c5>] ? rest_init+0x79/0x7b
+    [<c15c66a9>] ? start_kernel+0x297/0x29c
+    [<c15c60b0>] ? i386_start_kernel+0xb0/0xb7
+   ---[ end trace 583f33bb1aa207a9 ]---
+
+Signed-off-by: Xander Hover <LKML at hover.be>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/ethernet/broadcom/b44.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/b44.c b/drivers/net/b44.c
+index 4cf835d..3fb66d0 100644
+--- a/drivers/net/b44.c
++++ b/drivers/net/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);
+ 	}
+ 
+ 	bp->tx_cons = cons;
+-- 
+1.7.7.4
+
diff --git a/kernel.spec b/kernel.spec
index a36480d..42b1352 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -721,6 +721,9 @@ Patch21046: alps.patch
 #rhbz 767173
 Patch21047: iwlwifi-allow-to-switch-to-HT40-if-not-associated.patch
 
+#rhbz 741117
+Patch21048: b44-Use-dev_kfree_skb_irq-in-b44_tx.patch
+
 %endif
 
 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1337,6 +1340,9 @@ ApplyPatch alps.patch
 #rhbz 767173
 ApplyPatch iwlwifi-allow-to-switch-to-HT40-if-not-associated.patch
 
+#rhbz 741117
+ApplyPatch b44-Use-dev_kfree_skb_irq-in-b44_tx.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -1986,6 +1992,7 @@ fi
 %changelog
 * Tue Dec 20 2011 Josh Boyer <jwboyer at redhat.com>
 - Fix config options in arm configs after latest commits
+- Backport upstream fix for b44_poll oops (rhbz #741117)
 
 * Mon Dec 19 2011 Dave Jones <davej at redhat.com>
 - x86, dumpstack: Fix code bytes breakage due to missing KERN_CONT


More information about the scm-commits mailing list