linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@techsingularity.net>
To: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] mm/page_alloc: avoid potential NULL pointer dereference
Date: Tue, 23 Apr 2019 15:35:40 +0100	[thread overview]
Message-ID: <20190423143540.GQ18914@techsingularity.net> (raw)
In-Reply-To: <20190423120806.3503-1-aryabinin@virtuozzo.com>

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 crashes only because alloc_flags_nofragment()
> has another bug which allows compiler to optimize away all accesses to
> 'zone'.
> 
> Fixes: 6bb154504f8b ("mm, page_alloc: spread allocations across zones before introducing fragmentation")
> Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>

Acked-by: Mel Gorman <mgorman@techsingularity.net>

-- 
Mel Gorman
SUSE Labs


      parent reply	other threads:[~2019-04-23 14:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23 12:08 [PATCH 1/2] mm/page_alloc: avoid potential NULL pointer dereference Andrey Ryabinin
2019-04-23 12:08 ` [PATCH 2/2] mm/page_alloc: fix never set ALLOC_NOFRAGMENT flag Andrey Ryabinin
2019-04-23 14:35   ` Mel Gorman
2019-04-23 19:01   ` Andrew Morton
2019-04-24  9:04     ` Mel Gorman
2019-04-24 22:46       ` Andrew Morton
2019-04-24 23:40         ` Mel Gorman
2019-04-25 21:09           ` Andrew Morton
2019-04-23 14:35 ` Mel Gorman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190423143540.GQ18914@techsingularity.net \
    --to=mgorman@techsingularity.net \
    --cc=akpm@linux-foundation.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).