Re: [PATCHv2 06/14] mm/page_alloc: Propagate encryption KeyID through page allocator

From: Kirill A. Shutemov
Date: Fri Mar 30 2018 - 04:08:22 EST


On Wed, Mar 28, 2018 at 07:55:32PM +0300, Kirill A. Shutemov wrote:
> diff --git a/arch/tile/mm/homecache.c b/arch/tile/mm/homecache.c
> index 4432f31e8479..99580091830b 100644
> --- a/arch/tile/mm/homecache.c
> +++ b/arch/tile/mm/homecache.c
> @@ -398,7 +398,7 @@ struct page *homecache_alloc_pages_node(int nid, gfp_t gfp_mask,
> {
> struct page *page;
> BUG_ON(gfp_mask & __GFP_HIGHMEM); /* must be lowmem */
> - page = alloc_pages_node(nid, gfp_mask, order);
> + page = alloc_pages_node(rch/x86/events/intel/pt.cnid, gfp_mask, order, 0);
> if (page)
> homecache_change_page_home(page, order, home);
> return page;

Ouch. Fixup:

diff --git a/arch/tile/mm/homecache.c b/arch/tile/mm/homecache.c
index 99580091830b..9eb14da556a8 100644
--- a/arch/tile/mm/homecache.c
+++ b/arch/tile/mm/homecache.c
@@ -398,7 +398,7 @@ struct page *homecache_alloc_pages_node(int nid, gfp_t gfp_mask,
{
struct page *page;
BUG_ON(gfp_mask & __GFP_HIGHMEM); /* must be lowmem */
- page = alloc_pages_node(rch/x86/events/intel/pt.cnid, gfp_mask, order, 0);
+ page = alloc_pages_node(nid, gfp_mask, order, 0);
if (page)
homecache_change_page_home(page, order, home);
return page;
--
Kirill A. Shutemov