linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@parallels.com>
To: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>,
	linux-mm@kvack.org, David Rientjes <rientjes@google.com>,
	Matt Mackall <mpm@selenic.com>, Joonsoo Kim <js1304@gmail.com>
Subject: Re: Common [17/20] Move duping of slab name to slab_common.c
Date: Thu, 14 Jun 2012 12:19:10 +0400	[thread overview]
Message-ID: <4FD99E7E.9040001@parallels.com> (raw)
In-Reply-To: <20120613152524.444246406@linux.com>

On 06/13/2012 07:25 PM, Christoph Lameter wrote:
>   	mutex_unlock(&slab_mutex);
> @@ -128,6 +137,7 @@ void kmem_cache_destroy(struct kmem_cach
>   		if (s->flags&  SLAB_DESTROY_BY_RCU)
>   			rcu_barrier();
>
> +		kfree(s->name);
>   		kmem_cache_free(kmem_cache, s);
>   	} else {
>   		list_add(&s->list,&slab_caches);

You forgot to remove the freeing of name in kmem_cache_release. This 
kfree here then leads to a double free.


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

  reply	other threads:[~2012-06-14  8:21 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-13 15:24 Common [00/20] Sl[auo]b: Common code rework V5 (for merge) Christoph Lameter
2012-06-13 15:24 ` Common [01/20] [slob] Define page struct fields used in mm_types.h Christoph Lameter
2012-06-13 15:24 ` Common [03/20] [slob] Remove various small accessors Christoph Lameter
2012-06-13 15:24 ` Common [04/20] [slab] Use page struct fields instead of casting Christoph Lameter
2012-06-13 15:24 ` Common [05/20] [slab] Remove some accessors Christoph Lameter
2012-06-13 15:24 ` Common [06/20] Extract common fields from struct kmem_cache Christoph Lameter
2012-06-13 15:24 ` Common [07/20] [slab] Get rid of obj_size macro Christoph Lameter
2012-06-13 15:24 ` Common [08/20] Extract common code for kmem_cache_create() Christoph Lameter
2012-06-14  8:15   ` Glauber Costa
2012-06-14 14:18     ` Christoph Lameter
2012-06-14 14:20       ` Glauber Costa
2012-06-14 14:46         ` Christoph Lameter
2012-06-13 15:25 ` Common [09/20] Common definition for boot state of the slab allocators Christoph Lameter
2012-06-13 15:25 ` Common [10/20] Use a common mutex definition Christoph Lameter
2012-06-13 15:25 ` Common [11/20] Move kmem_cache_create mutex handling to common code Christoph Lameter
2012-06-13 15:25 ` Common [13/20] Extract a common function for kmem_cache_destroy Christoph Lameter
2012-06-13 15:25 ` Common [14/20] Always use the name "kmem_cache" for the slab cache with the kmem_cache structure Christoph Lameter
2012-06-14  8:16   ` Glauber Costa
2012-06-14 14:12     ` Christoph Lameter
2012-06-13 15:25 ` Common [16/20] Get rid of __kmem_cache_destroy Christoph Lameter
2012-06-13 15:25 ` Common [17/20] Move duping of slab name to slab_common.c Christoph Lameter
2012-06-14  8:19   ` Glauber Costa [this message]
2012-06-13 15:25 ` Common [18/20] Do slab aliasing call from common code Christoph Lameter
2012-06-13 15:25 ` Common [19/20] Allocate kmem_cache structure in slab_common.c Christoph Lameter
2012-06-14 10:16   ` Pekka Enberg
2012-06-14 10:34     ` Glauber Costa
2012-06-14 18:14       ` Christoph Lameter
2012-06-20  7:07         ` Pekka Enberg
2012-06-13 15:25 ` Common [20/20] Common alignment code Christoph Lameter
2012-06-14  8:14 ` Common [00/20] Sl[auo]b: Common code rework V5 (for merge) Glauber Costa
2012-06-14 14:03   ` Christoph Lameter
  -- strict thread matches above, loose matches on Subject: below --
2012-06-01 19:52 Common [00/20] Sl[auo]b: Common code rework V4 Christoph Lameter
2012-06-01 19:53 ` Common [17/20] Move duping of slab name to slab_common.c Christoph Lameter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FD99E7E.9040001@parallels.com \
    --to=glommer@parallels.com \
    --cc=cl@linux.com \
    --cc=js1304@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=mpm@selenic.com \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).