netdev
[Top] [All Lists]

[PATCH] preempt count regression w/ lockless loopback patch

To: Andrew Morton <akpm@xxxxxxxx>
Subject: [PATCH] preempt count regression w/ lockless loopback patch
From: Arthur Kepner <akepner@xxxxxxx>
Date: Tue, 22 Jun 2004 09:24:40 -0700
Cc: netdev@xxxxxxxxxxx, "David S. Miller" <davem@xxxxxxxxxx>, Chris Wright <chrisw@xxxxxxxx>, Bob Gill <gillb4@xxxxxxxxxxxxxxx>
In-reply-to: <20040621035702.6114bdbe.akpm@osdl.org>
References: <200406210510.i5L5A340018849@hera.kernel.org> <20040621035702.6114bdbe.akpm@osdl.org>
Sender: netdev-bounce@xxxxxxxxxxx
On Mon, 21 Jun 2004, Andrew Morton wrote:

> The loopback_stats handling looks wrong:
> .....
>
> each get_cpu_ptr() does get_cpu(), which increments preempt_count().  But
> there is only a single put_cpu_ptr() in there.

Correct. At least one person has tripped over this already. (See "Re:
[2.6.7-bk] NFS-related kernel panic" on lkml.)

> .....
>
> This compiles, but does need runtime testing.
>

I made one small change in get_stats() and tested with a preemptible
kernel on a 32p system. Looks good. The tested patch is attached.

--

Arthur

Attachment: patch.preempt_bug
Description: patch for preempt count bug

<Prev in Thread] Current Thread [Next in Thread>