diff options
| author | Zi Yan <[email protected]> | 2025-11-05 16:29:10 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-11-15 18:52:01 +0000 |
| commit | f1d47cafe513b5552a5b20a7af0936d9070a8a78 (patch) | |
| tree | 3d152d56b8692893af6330b2c85d6c016dc122bc /lib/mpi/mpi-mod.c | |
| parent | MAINTAINERS: update David Hildenbrand's email address (diff) | |
| download | kernel-f1d47cafe513b5552a5b20a7af0936d9070a8a78.tar.gz kernel-f1d47cafe513b5552a5b20a7af0936d9070a8a78.zip | |
mm/huge_memory: fix folio split check for anon folios in swapcache
Both uniform and non uniform split check missed the check to prevent
splitting anon folios in swapcache to non-zero order.
Splitting anon folios in swapcache to non-zero order can cause data
corruption since swapcache only support PMD order and order-0 entries.
This can happen when one use split_huge_pages under debugfs to split
anon folios in swapcache.
In-tree callers do not perform such an illegal operation. Only debugfs
interface could trigger it. I will put adding a test case on my TODO
list.
Fix the check.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 58729c04cf10 ("mm/huge_memory: add buddy allocator like (non-uniform) folio_split()")
Signed-off-by: Zi Yan <[email protected]>
Reported-by: "David Hildenbrand (Red Hat)" <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Acked-by: David Hildenbrand (Red Hat) <[email protected]>
Cc: Baolin Wang <[email protected]>
Cc: Barry Song <[email protected]>
Cc: Dev Jain <[email protected]>
Cc: Lance Yang <[email protected]>
Cc: Liam Howlett <[email protected]>
Cc: Lorenzo Stoakes <[email protected]>
Cc: Nico Pache <[email protected]>
Cc: Ryan Roberts <[email protected]>
Cc: Wei Yang <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions
