lkml.org 
[lkml]   [2014]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -mm] memcg: fix possible use-after-free in memcg_kmem_get_cache
On Sun, 7 Dec 2014, Vladimir Davydov wrote:

> diff --git a/mm/slub.c b/mm/slub.c
> index 95d214255663..7ddf01e2a465 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -2450,6 +2450,7 @@ redo:
>
> slab_post_alloc_hook(s, gfpflags, object);
>
> + memcg_kmem_put_cache(s);
> return object;
> }

The function should be added to slab_post_alloc().

Also move the memcg_kmem_get_cache() into slab_pre_alloc_hook().



\
 
 \ /
  Last update: 2014-12-08 16:21    [W:0.081 / U:1.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site