[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200701152427.GS25523@casper.infradead.org>
Date: Wed, 1 Jul 2020 16:24:27 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Long Li <lonuxli.64@...il.com>
Cc: cl@...ux.com, penberg@...nel.org, rientjes@...gle.com,
iamjoonsoo.kim@....com, akpm@...ux-foundation.org,
linux-mm@...ck.org, 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 01, 2020 at 03:16:45PM +0000, Long Li 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: Matthew Wilcox (Oracle) <willy@...radead.org>
Powered by blists - more mailing lists