lkml.org 
[lkml]   [2009]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT BISECT] BUG kmalloc-8192: Object already free from kmem_cache_destroy
On 09/14/2009 07:11 AM, Eric Paris wrote:
> On Sun, 2009-09-13 at 14:33 -0400, Eric Paris wrote:
>
>> 2a38a002fbee06556489091c30b04746222167e4 is first bad commit
>> commit 2a38a002fbee06556489091c30b04746222167e4
>> Author: Xiaotian Feng<dfeng@redhat.com>
>> Date: Wed Jul 22 17:03:57 2009 +0800
>>
>> slub: sysfs_slab_remove should free kmem_cache when debug is enabled
>>
>> kmem_cache_destroy use sysfs_slab_remove to release the kmem_cache,
>> but when CONFIG_SLUB_DEBUG is enabled, sysfs_slab_remove just release
>> related kobject, the whole kmem_cache is missed to release and cause
>> a memory leak.
>>
>> Acked-by: Christoph Lameer<cl@linux-foundation.org>
>> Signed-off-by: Xiaotian Feng<dfeng@redhat.com>
>> Signed-off-by: Pekka Enberg<penberg@cs.helsinki.fi>
>>
>> CONFIG_SLUB_DEBUG=y
>> CONFIG_SLUB=y
>> CONFIG_SLUB_DEBUG_ON=y
>> # CONFIG_SLUB_STATS is not set
>>
> I also had problems destroying a kmem_cache in a security_initcall()
> function which had a different backtrace (it's what made me create the
> module and bisect.) So be sure to let me know what you find so I can
> be sure that we fix that place as well (I believe that was a kref
> problem rather than a double free)
>
> -Eric
>
>
>
That's my fault... Please drop this patch, I didn't notice the free
action in kobject release phase.. Thanks for point it out.


\
 
 \ /
  Last update: 2009-09-14 05:43    [W:0.093 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site