Forum Search:
OpenVZ Forum
Members
Search
Help
Register
Login
Home
Home
»
Mailing lists
»
Devel
»
[PATCH v2 00/29] kmem limitation for memcg
Show:
Today's Messages
::
Show Polls
::
Message Navigator
E-mail to friend
Re: [PATCH v2 01/29] slab: dup name string
[
message #46366
is a reply to
message #46303
]
Tue, 15 May 2012 22:04
David Rientjes
Messages:
59
Registered:
November 2006
Member
On Fri, 11 May 2012, Glauber Costa wrote:
> diff --git a/mm/slab.c b/mm/slab.c
> index e901a36..91b9c13 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -2118,6 +2118,7 @@ static void __kmem_cache_destroy(struct kmem_cache *cachep)
> kfree(l3);
> }
> }
> + kfree(cachep->name);
> kmem_cache_free(&cache_cache, cachep);
> }
>
> @@ -2526,7 +2527,7 @@ kmem_cache_create (const char *name, size_t size, size_t align,
> BUG_ON(ZERO_OR_NULL_PTR(cachep->slabp_cache));
> }
> cachep->ctor = ctor;
> - cachep->name = name;
> + cachep->name = kstrdup(name, GFP_KERNEL);
>
> if (setup_cpu_cache(cachep, gfp)) {
> __kmem_cache_destroy(cachep);
Couple problems:
- allocating memory for a string of an unknown, unchecked size, and
- could potentially return NULL which I suspect will cause problems
later.
Report message to a moderator
[
Message index
]
[PATCH v2 00/29] kmem limitation for memcg
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 03/29] memcg: Always free struct memcg through schedule_work()
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 07/29] memcg: Reclaim when more than one page needed.
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 09/29] memcg: change defines to an enum
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 01/29] slab: dup name string
By:
Glauber Costa
on Fri, 11 May 2012 17:44
Re: [PATCH v2 01/29] slab: dup name string
By:
David Rientjes
on Tue, 15 May 2012 22:04
Re: [PATCH v2 01/29] slab: dup name string
By:
Glauber Costa
on Wed, 16 May 2012 06:12
[PATCH v2 10/29] res_counter: don't force return value checking in res_counter_charge_nofail
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 02/29] slub: fix slab_state for slub
By:
Glauber Costa
on Fri, 11 May 2012 17:44
Re: [PATCH v2 02/29] slub: fix slab_state for slub
By:
Christoph Lameter
on Fri, 11 May 2012 17:51
Re: [PATCH v2 02/29] slub: fix slab_state for slub
By:
David Rientjes
on Tue, 15 May 2012 21:55
Re: [PATCH v2 02/29] slub: fix slab_state for slub
By:
Glauber Costa
on Wed, 16 May 2012 06:10
Re: [PATCH v2 02/29] slub: fix slab_state for slub
By:
Glauber Costa
on Thu, 17 May 2012 10:14
[PATCH v2 06/29] memcg: Make it possible to use the stock for more than one page.
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 04/29] slub: always get the cache from its page in kfree
By:
Glauber Costa
on Fri, 11 May 2012 17:44
Re: [PATCH v2 04/29] slub: always get the cache from its page in kfree
By:
Christoph Lameter
on Fri, 11 May 2012 17:53
Re: [PATCH v2 04/29] slub: always get the cache from its page in kfree
By:
Glauber Costa
on Fri, 11 May 2012 17:57
Re: [PATCH v2 04/29] slub: always get the cache from its page in kfree
By:
Christoph Lameter
on Fri, 11 May 2012 18:06
Re: [PATCH v2 04/29] slub: always get the cache from its page in kfree
By:
Glauber Costa
on Fri, 11 May 2012 18:11
Re: [PATCH v2 04/29] slub: always get the cache from its page in kfree
By:
Christoph Lameter
on Fri, 11 May 2012 18:17
Re: [PATCH v2 04/29] slub: always get the cache from its page in kfree
By:
Glauber Costa
on Fri, 11 May 2012 18:20
Re: [PATCH v2 04/29] slub: always get the cache from its page in kfree
By:
Christoph Lameter
on Fri, 11 May 2012 18:32
Re: [PATCH v2 04/29] slub: always get the cache from its page in kfree
By:
Glauber Costa
on Fri, 11 May 2012 18:42
Re: [PATCH v2 04/29] slub: always get the cache from its page in kfree
By:
Christoph Lameter
on Fri, 11 May 2012 18:56
Re: [PATCH v2 04/29] slub: always get the cache from its page in kfree
By:
Glauber Costa
on Fri, 11 May 2012 18:58
Re: [PATCH v2 04/29] slub: always get the cache from its page in kfree
By:
Christoph Lameter
on Fri, 11 May 2012 19:09
Re: [PATCH v2 04/29] slub: always get the cache from its page in kfree
By:
Glauber Costa
on Fri, 11 May 2012 19:11
Re: [PATCH v2 04/29] slub: always get the cache from its page in kfree
By:
Christoph Lameter
on Fri, 11 May 2012 19:20
Re: [PATCH v2 04/29] slub: always get the cache from its page in kfree
By:
Glauber Costa
on Fri, 11 May 2012 19:24
[PATCH v2 12/29] kmem slab accounting basic infrastructure
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 05/29] slab: rename gfpflags to allocflags
By:
Glauber Costa
on Fri, 11 May 2012 17:44
Re: [PATCH v2 05/29] slab: rename gfpflags to allocflags
By:
Christoph Lameter
on Fri, 11 May 2012 17:54
Re: [PATCH v2 05/29] slab: rename gfpflags to allocflags
By:
David Rientjes
on Tue, 15 May 2012 21:57
[PATCH v2 11/29] cgroups: ability to stop res charge propagation on bounded ancestor
By:
Glauber Costa
on Fri, 11 May 2012 17:44
Re: [PATCH v2 11/29] cgroups: ability to stop res charge propagation on bounded ancestor
By:
KAMEZAWA Hiroyuki
on Tue, 15 May 2012 02:59
Re: [PATCH v2 11/29] cgroups: ability to stop res charge propagation on bounded ancestor
By:
Glauber Costa
on Wed, 16 May 2012 06:16
[PATCH v2 08/29] slab: use obj_size field of struct kmem_cache when not debugging
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 13/29] slab/slub: struct memcg_params
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 14/29] slub: consider a memcg parameter in kmem_create_cache
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 15/29] slab: pass memcg parameter to kmem_cache_create
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 16/29] slub: create duplicate cache
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 25/29] memcg: Track all the memcg children of a kmem_cache.
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 17/29] slab: create duplicate cache
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 26/29] memcg: Per-memcg memory.kmem.slabinfo file.
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 18/29] memcg: kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Fri, 11 May 2012 17:44
Re: [PATCH v2 18/29] memcg: kmem controller charge/uncharge infrastructure
By:
KAMEZAWA Hiroyuki
on Tue, 15 May 2012 02:57
Re: [PATCH v2 18/29] memcg: kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Wed, 16 May 2012 06:42
Re: [PATCH v2 18/29] memcg: kmem controller charge/uncharge infrastructure
By:
KAMEZAWA Hiroyuki
on Wed, 16 May 2012 08:18
Re: [PATCH v2 18/29] memcg: kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Wed, 16 May 2012 08:25
Re: [PATCH v2 18/29] memcg: kmem controller charge/uncharge infrastructure
By:
KAMEZAWA Hiroyuki
on Wed, 16 May 2012 09:15
[PATCH v2 19/29] skip memcg kmem allocations in specified code regions
By:
Glauber Costa
on Fri, 11 May 2012 17:44
Re: [PATCH v2 19/29] skip memcg kmem allocations in specified code regions
By:
KAMEZAWA Hiroyuki
on Tue, 15 May 2012 02:46
Re: [PATCH v2 19/29] skip memcg kmem allocations in specified code regions
By:
Glauber Costa
on Wed, 16 May 2012 06:19
Re: [PATCH v2 19/29] skip memcg kmem allocations in specified code regions
By:
KAMEZAWA Hiroyuki
on Wed, 16 May 2012 07:55
[PATCH v2 20/29] slub: charge allocation to a memcg
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 21/29] slab: per-memcg accounting of slab caches
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 22/29] memcg: disable kmem code when not in use.
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 23/29] memcg: destroy memcg caches
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 24/29] memcg/slub: shrink dead caches
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 27/29] slub: create slabinfo file for memcg
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 28/29] slub: track all children of a kmem cache
By:
Glauber Costa
on Fri, 11 May 2012 17:44
[PATCH v2 29/29] Documentation: add documentation for slab tracker for memcg
By:
Glauber Costa
on Fri, 11 May 2012 17:44
Re: [PATCH v2 00/29] kmem limitation for memcg
By:
Glauber Costa
on Fri, 11 May 2012 18:05
Previous Topic:
[PATCH RFC 00/13] Lockd: grace period containerization
Next Topic:
[PATCH v5 0/2] fix static_key disabling problem in memcg
Goto Forum:
- General
Virtuozzo 7 Beta Program
Support
HowTo
Discussions
- Mailing lists
Users
Devel
- International
German
French
Russian
- Test
TestForum
ml-test
-=]
Back to Top
[=-
[
Syndicate this forum (XML)
] [
] [
]
Current Time:
Sat Jun 28 16:37:20 GMT 2025
Total time taken to generate the page: 0.01936 seconds