Re: Notebooks

David S. Miller (davem@dm.cobaltmicro.com)
Wed, 19 Aug 1998 07:43:34 -0700


From: Andi Kleen <ak@muc.de>
Date: 19 Aug 1998 02:55:53 +0200

(from tcp_send_fin)

/* Socket is locked, keep trying until memory is available. */
do {
skb = sock_wmalloc(sk,
(MAX_HEADER +
sk->prot->max_header),
1, GFP_KERNEL);
} while (skb == NULL);

It would be better to return ENOMEM after a few iterations, even if it means
that the fin is not send. It is probably too late in the code freeze to fix
it properly now, but I wouldn't be surprised if it leads to more deadlocks
in the future.

It is a the smallest packet TCP can try to allocate, and it is the
most crucial packet to allocate successfully, and it is the one
allocation type in the entire TCP send path which cannot ever fail.

We had to allow it to fail in 2.0.x, and this was a bug, look for the
workaround for the disasterous result it causes in the 2.0.x TCP code,
grep for "don't show this to your mother" in a comment of something
like this.

Later,
David S. Miller
davem@dm.cobaltmicro.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html