Re: [PATCH 1/2] mm/compaction: skip folios containing hwpoisoned pages
From: Yuanhe Shu
Date: Sun Oct 25 2026 - 23:00:44 EST
On 10/22/26 20:39, Kaitao Cheng wrote:
> Here are a few subtle corner cases I came up with. They may be
> extremely unlikely to occur.
Both cases set the flag while the memcpy still succeeds - that is
the "how this makes sense" for checking after the copy: a check
before it misses them, the recheck after it catches both, and the
refusal is the same either way (the data is still good in case A,
already bad in case B). What no flag check, before or after, can
catch is corruption whose hardware report lands after the last
check; that needs architecture support, as David noted.
The migration paths spell out the same placement and races in v2
(patch 2, just posted), and the fallback patch ("mm/highmem: refuse
to copy hwpoisoned folios in the !copy_mc fallbacks") is posted as
well, with the races in its changelog.
--
Yuanhe