Re: [PATCH] mm/vmalloc: fix mischeck pfn valid in vmap_pfns

From: Christoph Hellwig
Date: Wed Mar 12 2025 - 02:18:49 EST


On Wed, Mar 12, 2025 at 02:15:12PM +0800, Huan Yang wrote:
> When invoke vmap_pfns, it call vmap_pfn_apply to set pfn into pte.
> It check pfn is valid, if true then warn and return.
>
> This is a mischeck, actually we need set a valid pfn into pte, not an
> invalid pfn.

As just discussed this is wrong. vmap_pfn is for mapping non-page
PFNs and the check is what enforces that. What is the point of having
that detailed discussion if you just send the broken patch anyway with
a commit log not even acknowledging the facts?