diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 21f68377d40f..ddb75c78879f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1460,6 +1460,10 @@ static void free_pcppages_bulk(struct zone *zone, int count, * below while (list_empty(list)) loop. */ count = min(pcp->count, count); + + /* Ensure requested pindex is drained first. */ + pindex = pindex - 1; + while (count > 0) { struct list_head *list; int nr_pages;