Re: [PATCH] mm/mempolicy: ignore a bind policy whose nodes have no memory
From: Gregory Price (Meta)
Date: Fri Nov 13 2026 - 15:39:18 EST
On 2026-11-13 14:47 -0500, Zi Yan wrote:
> On 13 Nov 2026, at 14:26, Gregory Price (Meta) wrote:
>
> > apply_policy_zone() assumes that policy->nodes intersects N_MEMORY, so
> > it reads a bind policy with no N_HIGH_MEMORY node as movable-only.
> >
> > On systems with CONFIG_CPUSETS=n, nothing rebinds policies when memory
> > is removed, so offlining all memory on the nodes a bind policy names
> > leaves it with none. The policy is then treated as movable-only, and
> > movable allocations are restricted to nodes without memory.
> >
> > This results in allocations failures, a VM_FAULT_OOM leak, and then
> > an infinitely retrying fault that hangs the process.
> >
> > page allocation failure: order:0, mode:0x140dca ... nodemask=2
> > Huh VM_FAULT_OOM leaked out to the #PF handler. Retrying PF
> >
> > Ignore a bind policy whose nodes have no memory. policy_nodemask()
> > already ignores a bind policy that does not intersect the cpuset.
> > This covers hugetlb's policy_mbind_nodemask() as well.
> >
> > If the nodes regain memory, the policy applies again.
> >
> > CPUSETS=n with HOTREMOVE=y is unlikely a common configuration, so this
> > isn't marked for stable.
>
> Also no Fixes?
>
It wasn't quite obvious what to tag exactly. Since I don't think it's
worth backporting, wasn't sure I should bother spending time on the
Fixes tag.
--
~Gregory