Re: [PATCH 1/2] mm/page_alloc: avoid potential NULL pointer dereference

2019-04-23 Thread Mel Gorman
On Tue, Apr 23, 2019 at 03:08:05PM +0300, Andrey Ryabinin wrote: > ac.preferred_zoneref->zone passed to alloc_flags_nofragment() can be NULL. > 'zone' pointer unconditionally derefernced in alloc_flags_nofragment(). > Bail out on NULL zone to avoid potential crash. > Currently we don't see any

[PATCH 1/2] mm/page_alloc: avoid potential NULL pointer dereference

2019-04-23 Thread Andrey Ryabinin
ac.preferred_zoneref->zone passed to alloc_flags_nofragment() can be NULL. 'zone' pointer unconditionally derefernced in alloc_flags_nofragment(). Bail out on NULL zone to avoid potential crash. Currently we don't see any crashes only because alloc_flags_nofragment() has another bug which allows