Re: [PATCH 3/3] mm/vmalloc: extract show_busy_info from vmalloc_info_show

From: Andrew Morton

Date: Tue Sep 15 2026 - 00:38:32 EST


On Mon, 14 Sep 2026 19:10:37 +0200 Uladzislau Rezki <urezki@xxxxxxxxx> wrote:

> On Mon, Sep 14, 2026 at 11:34:02AM +0800, Ye Liu wrote:
> > From: Ye Liu <liuye@xxxxxxxxxx>
> >
> > Extract the busy vmap area iteration into show_busy_info, mirroring
> > the existing show_purge_info pattern.
> >
> > Signed-off-by: Ye Liu <liuye@xxxxxxxxxx>
> > ---
> > mm/vmalloc.c | 14 ++++++++++----
> > 1 file changed, 10 insertions(+), 4 deletions(-)
> >
> > diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> > index 797933ba9451..7638845377f5 100644
> > --- a/mm/vmalloc.c
> > +++ b/mm/vmalloc.c
> > @@ -5345,12 +5345,12 @@ static void show_purge_info(struct seq_file *m)
> > }
> > }
> >
> > -static int vmalloc_info_show(struct seq_file *m, void *p)
> > +static void show_busy_info(struct seq_file *m)
> > {
> > struct vmap_node *vn;
> > struct vmap_area *va;
> > struct vm_struct *v;
> > - unsigned int *counters;
> > + unsigned int *counters = NULL;
> >
> Is setting counters setting to NULL odd here?

static void show_busy_info(struct seq_file *m)
{
...
unsigned int *counters = NULL;

if (IS_ENABLED(CONFIG_NUMA))
counters = ...

...

if (IS_ENABLED(CONFIG_NUMA))
kfree(counters);
...
}

Presumably some dumb compiler or checker warned about
kfree(uninitialized-val).