linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: William Kucharski <william.kucharski@oracle.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Uladzislau Rezki <urezki@gmail.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Nicholas Piggin <npiggin@gmail.com>
Subject: Re: [PATCH] Support HIGHMEM pages in vmap_pages_range_noflush()
Date: Fri, 19 Aug 2022 10:06:08 +0000	[thread overview]
Message-ID: <5A894844-3A8E-44AA-BFEF-3723520A8FD6@oracle.com> (raw)
In-Reply-To: <Yv6qHc6e+m7TMWhi@casper.infradead.org>

Looks good and IMHO it's more self-documenting.

Reviewed-by: <william.kucharski@oracle.com>

> On Aug 18, 2022, at 3:07 PM, Matthew Wilcox <willy@infradead.org> wrote:
> 
> If the pages being mapped are in HIGHMEM, page_address() returns NULL.
> This probably wasn't noticed before because there aren't currently
> any architectures with HAVE_ARCH_HUGE_VMALLOC and HIGHMEM, but it's
> simpler to call page_to_phys() and futureproofs us against such
> configurations existing.
> 
> Fixes: 121e6f3258fe ("mm/vmalloc: hugepage vmalloc mappings")
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> 
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index dd6cdb201195..bea9b0c37295 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -590,7 +590,7 @@ int vmap_pages_range_noflush(unsigned long addr, unsigned long end,
> int err;
> 
> err = vmap_range_noflush(addr, addr + (1UL << page_shift),
> - __pa(page_address(pages[i])), prot,
> + page_to_phys(pages[i]), prot,
> page_shift);
> if (err)
> return err;
> 



      reply	other threads:[~2022-08-19 10:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18 21:07 Matthew Wilcox
2022-08-19 10:06 ` William Kucharski [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=5A894844-3A8E-44AA-BFEF-3723520A8FD6@oracle.com \
    --to=william.kucharski@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@gmail.com \
    --cc=urezki@gmail.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