Re: TCP accept bug in 2.0 and 2.0.34pre10 patch

Andi Kleen (ak@muc.de)
21 Apr 1998 15:25:34 +0200


Jaroslav Kysela <perex@jcu.cz> writes:

> Hi!
>
> I found strange TCP accept bug in 2.0 kernels (include 2.0.34pre10).
> List of waiting TCP connections (socket -> receive_queue) can be at some
> times corrupted due to interrupts.
> This bug can produce some "zombie" sockets which aren't passed
> over accept() to user space, but leaves in kernel forever or until some
> timeout isn't expired.
> I found this bug on 100Mbit/s Voice Grade network when I tested
> performance of squid cache program with my tests (test program allows open
> up to 2500 simultaneous connections to cache). Server and client are SMP
> machines (Pentium Pro) with 2.0.33 + 2.0.34pre10 kernel. I wrote two
> (server & client) programs which simulate above situation (these programs
> are available at request) and bellow patch for kernel is result of my
> work. With this patch wasn't bug produced again... Maybe Alan Cox should
> verify this patch and include it to 2.0.34 kernel. Thank you...

[... patch to cure overoptimization deleted ...]

This patch can be done much simpler by using skb_unlink() [which implies
cli/sti] instead of __skb_unlink.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu