Re: [PATCH V2] mm, page_alloc: fix core hung in free_pcppages_bulk()
From: David Rientjes
Date: Wed Aug 12 2020 - 14:53:11 EST
On Wed, 12 Aug 2020, Charan Teja Kalla wrote:
> >> Signed-off-by: Charan Teja Reddy <charante@xxxxxxxxxxxxxx>
> >> ---
> >>
> >> v1: https://patchwork.kernel.org/patch/11707637/
> >>
> >> mm/page_alloc.c | 5 +++++
> >> 1 file changed, 5 insertions(+)
> >>
> >> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> >> index e4896e6..839039f 100644
> >> --- a/mm/page_alloc.c
> >> +++ b/mm/page_alloc.c
> >> @@ -1304,6 +1304,11 @@ static void free_pcppages_bulk(struct zone *zone, int count,
> >> struct page *page, *tmp;
> >> LIST_HEAD(head);
> >>
> >> + /*
> >> + * Ensure proper count is passed which otherwise would stuck in the
> >> + * below while (list_empty(list)) loop.
> >> + */
> >> + count = min(pcp->count, count);
> >> while (count) {
> >> struct list_head *list;
> >>
> >>
> >
> > Fixes: and Cc: stable... tags?
>
> Fixes: 5f8dcc21211a ("page-allocator: split per-cpu list into
> one-list-per-migrate-type")
> Cc: <stable@xxxxxxxxxxxxxxx> [2.6+]
>
Acked-by: David Rientjes <rientjes@xxxxxxxxxx>