Re: [patch] my latest oom stuff - another thing.

Andi Kleen (ak@muc.de)
25 Oct 1998 15:06:27 +0100


In article <Pine.LNX.3.96.981024185739.1080H-100000@penguin.transmeta.com>,
Linus Torvalds <torvalds@transmeta.com> writes:

> But I suspect that the REAL bug is that there may be code-paths that busy
> loop forever if they get NULL from __get_free_pages(). That's bad. We
> found and fixed one in the TCP code earlier, and the way to figure them
> out is to add a printk() (or a stack trace, in fact) to the NULL return

I forgot, there is another TCP case too where it might loop endlessly:

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);

Fixing it here is harder, because when the FIN is not put into the retransmit
queue it menas that data will be lost (it is the same dilemma as Ingo has in
his raid code)

-Andi

-
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.tux.org/lkml/