Re: Common [17/20] Move duping of slab name to slab_common.c

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

 



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@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]