Re: buffer_head slab memory leak, Linux bug?

From: Andi Kleen (ak@suse.de)
Date: Sun Sep 02 2001 - 08:13:27 EST


Elisheva Alexander <ealexand@checkpoint.com> writes:

> it happens quite often (at random), so it's not too hard to recreate it.

It is linux telling you that your code is crappy ;)

It's easy to fix. You just need to fix the lock to not turn off interrupts
for such a long time. If you're writing non driver network code you likely don't need
an _irqsave lock anyways, as a _bh lock should suffice. Better would be to use
a different lock structure however for such long locks that do not depend on blocking
bottom halves or interrupts (e.g. see how the TCP socket lock works as an example)

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Sep 07 2001 - 21:00:14 EST