mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ppc: fix sungem NAPI
@ 2004-09-10  3:49 Benjamin Herrenschmidt
  2004-09-10  5:12 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2004-09-10  3:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linus Torvalds, David S. Miller, Linux Kernel list

Hi !

The recent sungem NAPI change introduced a bug: dev_kfree_skb() is called
within the spinlock, thus triggers all sort of WARN_ON's later on down the
stack.

This patch changes it to dev_kfree_skb_any(), I hope that is fine
as we aren't really in interrupt, are we ? (I don't know in what
context NAPI polling occurs, is it a timer IRQ ?)

Ben.

===== drivers/net/sungem.c 1.59 vs edited =====
--- 1.59/drivers/net/sungem.c	2004-09-08 06:17:59 +10:00
+++ edited/drivers/net/sungem.c	2004-09-10 13:44:18 +10:00
@@ -651,7 +651,7 @@
 		}
 
 		gp->net_stats.tx_packets++;
-		dev_kfree_skb(skb);
+		dev_kfree_skb_any(skb);
 	}
 	gp->tx_old = entry;
 



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ppc: fix sungem NAPI
  2004-09-10  3:49 [PATCH] ppc: fix sungem NAPI Benjamin Herrenschmidt
@ 2004-09-10  5:12 ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-09-10  5:12 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: akpm, torvalds, linux-kernel

On Fri, 10 Sep 2004 13:49:17 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> The recent sungem NAPI change introduced a bug: dev_kfree_skb() is called
> within the spinlock, thus triggers all sort of WARN_ON's later on down the
> stack.
> 
> This patch changes it to dev_kfree_skb_any(), I hope that is fine
> as we aren't really in interrupt, are we ? (I don't know in what
> context NAPI polling occurs, is it a timer IRQ ?)

NAPI polling occurs from softirq context.

Thanks for making me aware of this.  This fix is fine for
now, but it may be possible to simplify it and I'll look
into that.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-10  5:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-10  3:49 [PATCH] ppc: fix sungem NAPI Benjamin Herrenschmidt
2004-09-10  5:12 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome