Re: [RFC 1/4] mm, page_alloc: fix check for NULL preferred_zone
From: Mel Gorman
Date: Wed Jan 18 2017 - 04:47:02 EST
On Tue, Jan 17, 2017 at 11:16:07PM +0100, Vlastimil Babka wrote:
> Since commit c33d6c06f60f ("mm, page_alloc: avoid looking up the first zone in
> a zonelist twice") we have a wrong check for NULL preferred_zone, which can
> theoretically happen due to concurrent cpuset modification. We check the
> zoneref pointer which is never NULL and we should check the zone pointer.
>
> Fixes: c33d6c06f60f ("mm, page_alloc: avoid looking up the first zone in a zonelist twice")
> Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
Acked-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
--
Mel Gorman
SUSE Labs