Re: Common10 [10/20] Move duping of slab name to slab_common.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 5 Aug 2012, JoonSoo Kim wrote:

> We can remove some comment for name param of  __kmem_cache_create() in slab.c.

Ok.

> We need to remove CONFIG_DEBUG_VM for out_locked now,
> although later patch handles it.

Ok.

> > +       } else {
> > +               kfree(n);
> > +               err = -ENOSYS; /* Until __kmem_cache_create returns code */
> > +       }
>
> In mergeable case, leak for name is possible.
> __kmem_cache_create() doesn't set name to s->name in mergeable case.
> So, this memory can't be freed.

If __kmem_cache_create() finds a mergeable cache and returns a pointer
to another cache then then this branch wont be taken since s != NULL.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]