Re: [PATCH] mm/huge_memory: fix folio split check for anon folios in swapcache.

From: Andrew Morton

Date: Wed Nov 05 2025 - 18:57:53 EST


On Wed, 5 Nov 2025 11:29:10 -0500 Zi Yan <ziy@xxxxxxxxxx> wrote:

> Both uniform and non uniform split check missed the check to prevent
> splitting anon folios in swapcache to non-zero order. Fix the check.

Please describe the possible userspace-visible effects of the bug
especially when proposing a -stable backport.

> Fixes: 58729c04cf10 ("mm/huge_memory: add buddy allocator like (non-uniform) folio_split()")
> Reported-by: "David Hildenbrand (Red Hat)" <david@xxxxxxxxxx>
> Closes: https://lore.kernel.org/all/dc0ecc2c-4089-484f-917f-920fdca4c898@xxxxxxxxxx/

I was hopeful, but that's "from code inspection".

> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Zi Yan <ziy@xxxxxxxxxx>