Messages in this thread | | | Subject | Re: [patch 3/4 -mm] flex_array: poison free elements | From | Dave Hansen <> | Date | Mon, 24 Aug 2009 14:16:58 -0700 |
| |
On Mon, 2009-08-24 at 13:41 -0700, David Rientjes wrote: > LEX_ARRAY_FREE (or an additional poison value to > distinguish between use-uninitialized vs. use-after-free) must be used in > flex_array_clear() otherwise the cgroup patchset, the only proposed user > of this library code, could never shrink this array when pid's are free > like the kmalloc vs. vmalloc patchset could do.
Are you saying that you expected it to never reallocate the array, but have a permanent flex_array and that it just calls flex_array_clear() on the elements that it doesn't want any more, and the array ends up sparsely populated? I can see why we'd need a poison value in that case.
Or, are we just talking about a situation where we need to truncate the pidlist?
-- Dave
| |