lkml.org 
[lkml]   [2023]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/23] arm: allow pte_offset_map[_lock]() to fail
On Tue, May 09, 2023 at 09:42:44PM -0700, Hugh Dickins wrote:
> diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c
> index e4c2677cc1e9..2f6163f05e93 100644
> --- a/arch/arm/lib/uaccess_with_memcpy.c
> +++ b/arch/arm/lib/uaccess_with_memcpy.c
> @@ -74,6 +74,9 @@ pin_page_for_write(const void __user *_addr, pte_t **ptep, spinlock_t **ptlp)
> return 0;
>
> pte = pte_offset_map_lock(current->mm, pmd, addr, &ptl);
> + if (unlikely(!pte))
> + return 0;

Failing seems like the wrong thig to do if we transitioned from a PTE
to PMD here? Looks to me like we should goto a new label right after
the 'pmd = pmd_offset(pud, addr);', no?

\
 
 \ /
  Last update: 2023-05-10 16:29    [W:0.243 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site