Re: [PATCH] lib/idr.c: Zero memory properly in idr_remove_all

From: Stefan Richter
Date: Wed Jan 14 2009 - 11:21:58 EST


Kristian Høgsberg wrote:
> On Tue, 2009-01-13 at 14:48 -0800, Andrew Morton wrote:
>> What do we think of just removing the constructor and using
>> kmem_cache_zalloc()?
>
> We still need to zero out the idr_layer before returning it to the idr's
> internal free list.

I think so too. But a more robust solution would IMO be to initialize
an idr_layer /before/ use, not /after/ use. Will send a patch later.
--
Stefan Richter
-=====-==--= ---= -===-
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/