Re: [2.6.7-bk] NFS-related kernel panic

From: Arthur Kepner
Date: Tue Jun 22 2004 - 12:03:27 EST



On Mon, 21 Jun 2004, Chris Wright wrote:

>
> The lockless loopback transmission patch mucks up the preempt count.
> Can you give this patch a try?
>
> thanks,
> -chris
> --
> Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net
>

Yes, there's a problem with preempt count. And this patch is
the minimal fix for it.

However, Andrew Morton noted this problem already and posted
a patch to be tested yesterday. I'd like to suggest that we go
with his patch (very slightly modified) which I'll post in a few
minutes to netdev. (I will cc Chris and Bob on this too.)

--

Arthur


> ===== loopback.c 1.15 vs edited =====
> --- 1.15/drivers/net/loopback.c 2004-06-20 17:35:52 -07:00
> +++ edited/loopback.c 2004-06-21 20:23:06 -07:00
> @@ -143,10 +143,11 @@
>
> dev->last_rx = jiffies;
> if (likely(loopback_stats)) {
> - get_cpu_ptr(loopback_stats)->rx_bytes += skb->len;
> - get_cpu_ptr(loopback_stats)->tx_bytes += skb->len;
> - get_cpu_ptr(loopback_stats)->rx_packets++;
> - get_cpu_ptr(loopback_stats)->tx_packets++;
> + struct net_device_stats *stats = get_cpu_ptr(loopback_stats);
> + stats->rx_bytes += skb->len;
> + stats->tx_bytes += skb->len;
> + stats->rx_packets++;
> + stats->tx_packets++;
> put_cpu_ptr(loopback_stats);
> }
>
>
-
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/