Re: [PATCH] mm/huge_memory: fix override of entry in remove_migration_pmd

From: Andrew Morton

Date: Thu Nov 13 2025 - 18:08:12 EST


On Fri, 14 Nov 2025 07:55:29 +1100 Balbir Singh <balbirs@xxxxxxxxxx> wrote:

> >> THe logic LGTM but we don't want to have a bisect hazard here by having the bug
> >> introduced earlier then resolved here.
> >
> > Exactly.
> >
>
> The hazard is a VM_WARN_ON() that checks for is_migration_entry() in the
> call to softleaf_is_migration_young(). I am happy to go down that path,
> let me send out the fixups, it felt weird to break the rebase, but I
> am sure Andrew has a better way of dealing with this stuff.

Yes, please tell us which patch introduced the issue then send a fix
for that patch. We can figure out the softleaf changes later. (Which
this patch provides anyway).

Also, confusing that the changelog says "The softleaf changes exposed a
BUG in remove_rmap_pmd()" but it's remove_migration_pmd() that gets
altered. Please expand and clarify?