Re: [PATCH 2/3] proc: kpagecount: use snapshot_page()
From: SeongJae Park
Date: Fri Jun 27 2025 - 14:31:06 EST
On Thu, 26 Jun 2025 14:16:52 -0400 Luiz Capitulino <luizcap@xxxxxxxxxx> wrote:
> Currently, the call to folio_precise_page_mapcount() from kpage_read()
> can race with a folio split. When the race happens we trigger a
> VM_BUG_ON_FOLIO() in folio_entire_mapcount() (see splat below).
>
> This commit fixes this race by using snapshot_page() so that we
> retreive the folio mapcount using a folio snapshot.
[...]
> Signed-off-by: Luiz Capitulino <luizcap@xxxxxxxxxx>
Acked-by: SeongJae Park <sj@xxxxxxxxxx>
Thanks,
SJ
[...]