Re: [syzbot] [arm?] WARNING in copy_highpage

From: David Hildenbrand

Date: Mon Oct 06 2025 - 05:38:46 EST




The most reliable way would be to un-tag in case folio_mc_copy succeeded
but __folio_migrate_mapping() failed.

I'm also wondering whether we can simply perform the copy after the
__folio_migrate_mapping() call: the src folio is locked and unmapped,
nobody can really modify it. Same for the dst folio.

Answering that myself: obviously we don't want to fail after migrating the mapping, that is more expensive to recover from.

And I think that also explains how commit 060913999d7a ("mm: migrate: support poisoned recover from migrate folio") likely introduced the issue by moving the copy.

CCing Kefeng

--
Cheers

David / dhildenb