Re: tulip (pnic) errors in 2.6.5-rc1
From: Mikael Pettersson
Date: Thu Mar 18 2004 - 12:42:01 EST
Randy.Dunlap writes:
> On Thu, 18 Mar 2004 17:29:39 +0100 Mikael Pettersson wrote:
>
> | Jeff Garzik writes:
> | > Mikael Pettersson wrote:
> | > > Jeff Garzik writes:
> | > > > er, oops... lemme find the right patch...
> | > >
> | > > No change, still a flood of those tulip_rx() interrupt messages.
> | >
> | > hmmm. Well, it is something unrelated to tulip driver, then.
> |
> | Testing older -bk versions I've found that 2.6.4-bk2
> | is Ok but 2.6.4-bk3 has this message flood problem.
>
> Other than the netdev_priv() changes, I see removal of
> KERNEL_SYSCALLS and the addition of CONFIG_NET_POLL_CONTROLLER.
> Are you enabling CONFIG_NET_POLL_CONTROLLER?
> If so, can you test with it disabled?
No it wasn't NET_POLL_CONTROLLER (I didn't enable it).
I split the bk2->bk3 patch in pieces, and traced the bug to the
netdev_priv() change in in loopback.c. The bug is that loopback's
dev is static and its ->priv actually points to kmalloc:d space.
The netdev_priv() transformation is invalid for anything not
allocated with alloc_etherdev or alloc_netdev, so the patch
to loopback caused it to access and clobber static memory just
after its own dev.
It was my bad luck that tulip was the victim of that clobber.
Reverting the patch below solves the problem.
/Mikael
diff -ruN linux-2.6.4-bk2/drivers/net/loopback.c linux-2.6.4-bk3/drivers/net/loopback.c
--- linux-2.6.4-bk2/drivers/net/loopback.c 2004-03-11 14:01:28.000000000 +0100
+++ linux-2.6.4-bk3/drivers/net/loopback.c 2004-03-18 16:12:28.000000000 +0100
@@ -123,7 +123,7 @@
*/
static int loopback_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct net_device_stats *stats = (struct net_device_stats *)dev->priv;
+ struct net_device_stats *stats = netdev_priv(dev);
skb_orphan(skb);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/