From: Pekka Enberg <penberg@gmail.com>
To: Long Li <lonuxli.64@gmail.com>
Cc: willy@infradead.org, Christoph Lameter <cl@linux.com>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] mm, slab: Check GFP_SLAB_BUG_MASK before alloc_pages in kmalloc_order
Date: Wed, 1 Jul 2020 18:47:49 +0300 [thread overview]
Message-ID: <CAOJsxLGST_hgA3OPOdxQpZH_fX5m--WE2Wf8DfTLd557NUD5hQ@mail.gmail.com> (raw)
In-Reply-To: <20200701151645.GA26223@lilong>
On Wed, Jul 1, 2020 at 6:19 PM Long Li <lonuxli.64@gmail.com> wrote:
>
> kmalloc cannot allocate memory from HIGHMEM. Allocating large amounts
> of memory currently bypasses the check and will simply leak the memory
> when page_address() returns NULL. To fix this, factor the
> GFP_SLAB_BUG_MASK check out of slab & slub, and call it from
> kmalloc_order() as well. In order to make the code clear, the warning
> message is put in one place.
>
> Signed-off-by: Long Li <lonuxli.64@gmail.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
next prev parent reply other threads:[~2020-07-01 15:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-01 15:16 Long Li
2020-07-01 15:24 ` Matthew Wilcox
2020-07-01 15:47 ` Pekka Enberg [this message]
2020-07-01 18:52 ` David Rientjes
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=CAOJsxLGST_hgA3OPOdxQpZH_fX5m--WE2Wf8DfTLd557NUD5hQ@mail.gmail.com \
--to=penberg@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lonuxli.64@gmail.com \
--cc=rientjes@google.com \
--cc=willy@infradead.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