Linux-kernel mailing list archive 1999-32,: Re: 2.2.11: Complicated memory leak...

# Re: 2.2.11: Complicated memory leak...

Frank Horowitz (frank@ned.dem.csiro.au)
Thu, 12 Aug 1999 22:29:42 +0800

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Petr Sebor: "2.2.11 & ZIP"
- Previous message: Manfred Spraul: "get_empty_filp() is not SMP safe. [f_version problem]"
- Maybe in reply to: Frank Horowitz: "2.2.11: Complicated memory leak..."
- Next in thread: David S. Miller: "Re: 2.2.11: Complicated memory leak..."

Alan Cox wrote:
>
> > Have got /proc/memleak up and running and am seeing something like
> > 335000 calls to rtl8139.c:1229 (which is a call to dev_alloc_skb())
> > on the way to filling up memory.
>
> 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.

Backed out (via reversing the patch), but the problem still occurs
(which makes the following observation from David Miller, while true,
possibly not relevant):

> 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.
>

Incidently, the same memory leak occurs while running with the
latest-and-greatest version of rtl8139.c (v. 1.08a; from Donald Becker's
website). Also recall that the 2.2.11 patch, as delivered, runs fine on
the same box under Mandrake 6.0...

>
> If not tell me which of
> bridging, multicast routing, firewalling, masquerade, isdn4linux
>
> you have enabled and if you are using the feature.
>

Multicast is the only one set (CONFIG_IP_MULTICAST=y). I don't use it,
but I'll have to ask our network admin guy whether or not there is
actually any multicast traffic on our LAN. Since he's likely asleep now,
I'll have to ask him tomorrow :-)

Frank Horowitz

-
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/

- Next message: Petr Sebor: "2.2.11 & ZIP"
- Previous message: Manfred Spraul: "get_empty_filp() is not SMP safe. [f_version problem]"
- Maybe in reply to: Frank Horowitz: "2.2.11: Complicated memory leak..."
- Next in thread: David S. Miller: "Re: 2.2.11: Complicated memory leak..."