Re: [PATCH v4] sched/numa, mm: do not try to migrate memory to memoryless nodes

From: Byungchul Park
Date: Mon Feb 19 2024 - 22:20:31 EST


On Mon, Feb 19, 2024 at 07:05:20PM -0800, Andrew Morton wrote:
> On Tue, 20 Feb 2024 10:53:43 +0900 Byungchul Park <byungchul@xxxxxx> wrote:
>
> > > > IIUC, you will use patch as fix to the issue in
> > > >
> > > > https://lore.kernel.org/lkml/20240216111502.79759-1-byungchul@xxxxxx/
> > > >
> > > > If so, we need the Fixes: tag to make it land in -stable properly.
> > >
> > > Yes, this changelog is missing rather a lot of important information.
> >
> > This is not the root cause fix any more but just optimization.
>
> It would have been helpful to have told us this in the changelog :(

Sorry for that and making you guys confused.

> > That's
> > why I didn't add Fixes: tag and cc stable@xxxxxxxxxxxxxxx in here.
> >
> > Instead, I added Fixes: tag and cc'ed stable@xxxxxxxxxxxxxxx in the real
> > fix patch. check the following link please:
> >
> > https://lore.kernel.org/lkml/20240216111502.79759-1-byungchul@xxxxxx/
>
> But doesn't this patch "sched/numa, mm: do not try to migrate memory to
> memoryless nodes" also fix the bug? Do we truly need both?

Yes. The oops is gone with "sched/numa, mm: do not try to migrate memory
to memoryless nodes". However, as you know, wrongly manipulating array
index is very dangerous - what hackers are looking for. Even with security
in mind, both are necessary. Plus, no one gurantees the problematic code
is gone through with a numa node that has no managed zones in the future.

Byungchul