FAILED: patch "[PATCH] mm/migrate: untag addresses when querying page nodes" failed to apply to 5.10-stable tree
Subsystems (3)
Sasha Levin
maintainerThe patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x 7d8746d7dc9cc4003661011424e5880ea7ae364b
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 5.10.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 7d8746d7dc9cc4003661011424e5880ea7ae364b Mon Sep 17 00:00:00 2001
From: Hungyu Lin <[email protected]>
Date: Mon, 26 Oct 2026 19:53:29 +0000
Subject: [PATCH] mm/migrate: untag addresses when querying page nodes
When move_pages() is used with nodes == NULL, do_pages_stat_array() passes each page address directly to vma_lookup(). A valid tagged address therefore fails the VMA lookup and gets -EFAULT in its status entry, instead of the node reported for the corresponding untagged address.
The tagged address ABI permits these pointers, and the migration path already removes their tags. Apply the target mm's untagging rules to the query path as well, while holding its mmap read lock.
--- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/migrate.c +1 -1
@@ -2461,7 +2461,7 @@ static void do_pages_stat_array(struct mm_struct *mm, unsigned long nr_pages,mmap_read_lock (mm);for (i =0 ; i < nr_pages; i++) { -unsigned long addr = (unsigned long )(*pages); +unsigned long addr = (unsigned long )untagged_addr_remote (mm, *pages);struct vm_area_struct *vma;struct folio_walk fw;struct folio *folio;
Signature · 1 line
2.53.0
PATCH 1/1 mm/migrate: untag addresses when querying page nodes
[ Upstream commit 7d8746d7dc9cc4003661011424e5880ea7ae364b ]
When move_pages() is used with nodes == NULL, do_pages_stat_array() uses each page address as-is for its VMA lookup. A valid tagged address therefore gets -EFAULT in its status entry instead of the NUMA node reported for the corresponding untagged address.
Strip the tag before the VMA lookup while holding the mmap read lock. Use untagged_addr(), the helper available in 5.10 and already used by the migration path.
--- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/migrate.c +1 -1
@@ -1813,7 +1813,7 @@ static void do_pages_stat_array(struct mm_struct *mm, unsigned long nr_pages,mmap_read_lock (mm);for (i =0 ; i < nr_pages; i++) { -unsigned long addr = (unsigned long )(*pages); +unsigned long addr = (unsigned long )untagged_addr (*pages);struct vm_area_struct *vma;struct page *page;int err = -EFAULT ;
Signature · 1 line
2.50.1 (Apple Git-155)