Re: [PATCH] x86/mm: fix lookup_address() to handle physical memory holes in direct mapping
From: Edgecombe, Rick P
Date: Mon Jul 01 2024 - 15:15:42 EST
On Mon, 2024-07-01 at 13:59 -0500, Kalra, Ashish wrote:
>
> Then what is the caller supposed to do in this case ?
>
> As the return from lookup_address() is non-NULL in this case, accessing it
> causes a fatal #PF.
>
> Is the caller supposed to add the check for a valid PTE using pte_none(*pte) ?
I did a quick look at the callers, and some do their own check for pte_none().
But some don't. Some also assume the return can't be NULL.
Can you elaborate on your goal for this change? Just a cleanup?