Messages in this thread | | | Date | Tue, 11 Jul 2006 09:49:47 +0300 | From | "Pekka Enberg" <> | Subject | Re: [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/
| |