lkml.org 
[lkml]   [2006]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/10] Remove some of the kmemleak false positives
On 7/11/06, Catalin Marinas <catalin.marinas@gmail.com> wrote:
> @@ -166,6 +166,9 @@ struct platform_device *platform_device_
> struct platform_object *pa;
>
> pa = kzalloc(sizeof(struct platform_object) + strlen(name), GFP_KERNEL);
> + /* kmemleak cannot guess the object type because the block
> + * size is different from the object size */
> + memleak_typeid(pa, struct platform_object);

AFAICT, we about 300 kmalloc and kzalloc calls in the kernel that
would need this annotation. If we really can't fix the detector to
deal with these, I would prefer we introduce another memory allocator
function such as:

void *kzalloc_extra(size_t obj_size, size_t nr_extra, gfp_t flags);

That would do the right thing for memleak too.

Pekka
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-11 08:53    [W:0.350 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site