Re: 2.2.11: Complicated memory leak...

David S. Miller (davem@redhat.com)
Thu, 12 Aug 1999 07:04:22 -0700


Date: Thu, 12 Aug 1999 14:11:08 +0100 (BST)
From: Alan Cox <alan@lxorguk.ukuu.org.uk>

That is incoming network packets. So those should be arriving and leaving
again. That could be network layer bugs or rtl8139 bugs. Can you back out
the rtl8139 change and see if the problem stops occuring.

It's this rtl8139.c change in 2.2.11:

@@ -982,9 +1042,9 @@
rtl8129_rx(dev);

if (status & (TxOK | TxErr)) {
- unsigned int dirty_tx;
+ unsigned int dirty_tx = tp->dirty_tx;

- for (dirty_tx = tp->dirty_tx; dirty_tx < tp->cur_tx; dirty_tx++) {
+ while (tp->cur_tx - dirty_tx > 0) {
int entry = dirty_tx % NUM_TX_DESC;
int txstatus = inl(ioaddr + TxStatus0 + entry*4);

Unsigned stuff + comparisons against being negative == leak.

Later,
David S. Miller
davem@redhat.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.tux.org/lkml/