lkml.org 
[lkml]   [2019]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] x86/mm: Sync also unmappings in vmalloc_sync_one()
From
Date
On 7/17/19 12:14 AM, Joerg Roedel wrote:
>
> diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
> index 4a4049f6d458..d71e167662c3 100644
> --- a/arch/x86/mm/fault.c
> +++ b/arch/x86/mm/fault.c
> @@ -194,11 +194,12 @@ static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address)
>
> pmd = pmd_offset(pud, address);
> pmd_k = pmd_offset(pud_k, address);
> - if (!pmd_present(*pmd_k))
> - return NULL;
>
> - if (!pmd_present(*pmd))
> + if (pmd_present(*pmd) ^ pmd_present(*pmd_k))
> set_pmd(pmd, *pmd_k);

Wouldn't:

if (pmd_present(*pmd) != pmd_present(*pmd_k))
set_pmd(pmd, *pmd_k);

be a bit more intuitive?

But, either way, these look fine. For the series:

Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>

\
 
 \ /
  Last update: 2019-07-17 23:06    [W:0.209 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site