Re: [PATCH v2] mm: kfence: fix objcgs vector allocation

From: Muchun Song
Date: Mon Mar 28 2022 - 11:51:50 EST


On Mon, Mar 28, 2022 at 11:43 PM Marco Elver <elver@xxxxxxxxxx> wrote:
>
> On Mon, 28 Mar 2022 at 15:28, Muchun Song <songmuchun@xxxxxxxxxxxxx> wrote:
> >
> > If the kfence object is allocated to be used for objects vector, then
> > this slot of the pool eventually being occupied permanently since
> > the vector is never freed. The solutions could be 1) freeing vector
> > when the kfence object is freed or 2) allocating all vectors statically.
> > Since the memory consumption of object vectors is low, it is better to
> > chose 2) to fix the issue and it is also can reduce overhead of vectors
> > allocating in the future.
> >
> > Fixes: d3fb45f370d9 ("mm, kfence: insert KFENCE hooks for SLAB")
> > Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
>
> Reviewed-by: Marco Elver <elver@xxxxxxxxxx>

Thanks.

>
> Btw, how did you test this?
>

Yeah. No problem.