Re: [PATCH] mm: migrate: restore the nmask after successfully allocating on the target node

From: Oscar Salvador
Date: Fri Mar 28 2025 - 09:56:37 EST


On Wed, Mar 26, 2025 at 11:12:18AM +0800, wangchuanguo wrote:
> If memory is successfully allocated on the target node and the
> function directly returns without value restore for nmask,
> non-first migration operations in migrate_pages() by again label
> may ignore the nmask settings, thereby allowing new memory
> allocations for migration on any node.
>
> Signed-off-by: wangchuanguo <wangchuanguo@xxxxxxxxxx>

Unless I am missing something this looks reasonable, but I whonder why nobody
noticed it before.
It is a path that should be pretty exercised.


--
Oscar Salvador
SUSE Labs