Re: 2.6.10-rc2-mm3-V0.7.31-3 memory leak (was Re: Debugging a memory leak

From: Ingo Molnar
Date: Fri Nov 26 2004 - 22:24:36 EST



* Valdis.Kletnieks@xxxxxx <Valdis.Kletnieks@xxxxxx> wrote:

> On Tue, 23 Nov 2004 15:38:58 PST, Andrew Morton said:
> > Valdis.Kletnieks@xxxxxx wrote:
> > >
> > > Any advice how to shoot this one?
> >
> > Manfred's slab leak detector:
>
> Ahh, many thanks - that helped quite a bit. I tracked down the
> problem - it was in Ingo's VP patch.
>
> sys_ioperm() would allocate an 8K bitmap and save it in
> ->io_bitmap_ptr. Then when we hit exit_thread(), Ingo's code would
> zero the pointer and *then* pass the freshly-zero'ed pointer to
> kfree() - which of course did nothing particularly interesting. My
> fix was to save a copy of the pointer to pass to kfree. Am seeing no
> more leaks.

ah ... good catch - patch applied.

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