[PATCH v3 0/2] mm/page_isolation: fix UBSAN shift-out-of-bounds in isolate_single_pageblock

From: Qi Xi

Date: Tue Aug 25 2026 - 08:26:27 EST


Patch 1 fixes a UBSAN shift-out-of-bounds warning in the PageBuddy branch
of isolate_single_pageblock() triggered by concurrent buddy allocation.

Patch 2 addresses the same class of issue in the PageCompound branch, where
racy compound_order() and compound_head() reads could lead to out-of-range
shifts or incorrect page skipping.

Changes since v2:
- Patch 1: add a comment clarifying pageblock_isolate_and_move_free_pages()
splits cross-boundary PageBuddy. No code change.

Changes since v1:
- Patch 1: drop VM_WARN_ON_ONCE, bail out with -EBUSY instead
- Patch 2: new patch addressing PageCompound branch race

Qi Xi (2):
mm/page_isolation: fix UBSAN shift-out-of-bounds warning
mm/page_isolation: guard compound_order() against racing

mm/page_isolation.c | 40 ++++++++++++++++++++++++++++++++--------
1 file changed, 32 insertions(+), 8 deletions(-)

--
2.33.0