Messages in this thread | | | Date | Thu, 20 Nov 2008 20:45:19 +0200 | From | "Pekka Enberg" <> | Subject | Re: Possible memory leak via slub kmem_cache_create |
| |
Hi Catalin,
On Thu, Nov 20, 2008 at 11:51 AM, Catalin Marinas <catalin.marinas@arm.com> wrote: > My point is that the API is slightly different when slub is used since > kmem_cache_name is no longer guaranteed to return the same pointer > passed to kmem_cache_create. Maybe a documentation update: > > diff --git a/mm/slab.c b/mm/slab.c > index ea76bcb..9723a72 100644 > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -2124,6 +2124,8 @@ static int __init_refok setup_cpu_cache(struct kmem_cache > * > * @name must be valid until the cache is destroyed. This implies that > * the module calling this has to destroy the cache before getting unloaded. > + * Note that kmem_cache_name() is not guaranteed to return the same pointer, > + * therefore applications must manage it themselves.
Yes, makes sense. Care to send a patch I can apply?
Pekka
| |