--- x/mm/mmu_gather.c +++ y/mm/mmu_gather.c @@ -135,6 +135,8 @@ bool __tlb_remove_page_size(struct mmu_g if (!tlb_next_batch(tlb)) return true; batch = tlb->active; + if (batch->nr == batch->max) + return true; } VM_BUG_ON_PAGE(batch->nr > batch->max, encoded_page_ptr(page));