[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOJsxLGST_hgA3OPOdxQpZH_fX5m--WE2Wf8DfTLd557NUD5hQ@mail.gmail.com>
Date: Wed, 1 Jul 2020 18:47:49 +0300
From: Pekka Enberg <penberg@...il.com>
To: Long Li <lonuxli.64@...il.com>
Cc: willy@...radead.org, Christoph Lameter <cl@...ux.com>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] mm, slab: Check GFP_SLAB_BUG_MASK before alloc_pages
in kmalloc_order
On Wed, Jul 1, 2020 at 6:19 PM Long Li <lonuxli.64@...il.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@...il.com>
Reviewed-by: Pekka Enberg <penberg@...nel.org>
Powered by blists - more mailing lists