lkml.org 
[lkml]   [2023]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 2/6] userfaultfd: use kmap_local_page() in copy_huge_page_from_user()
On 03/31/23 17:39, Peng Zhang wrote:
> From: ZhangPeng <zhangpeng362@huawei.com>
>
> kmap() and kmap_atomic() are being deprecated in favor of
> kmap_local_page() which is appropriate for any thread local context.[1]
>
> Let's replace the kmap() and kmap_atomic() with kmap_local_page() in
> copy_huge_page_from_user(). When allow_pagefault is false, disable page
> faults to prevent potential deadlock.[2]
>
> [1] https://lore.kernel.org/all/20220813220034.806698-1-ira.weiny@intel.com/
> [2] https://lkml.kernel.org/r/20221025220136.2366143-1-ira.weiny@intel.com
>
> Signed-off-by: ZhangPeng <zhangpeng362@huawei.com>
> ---
> mm/memory.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)

Thanks,

Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
--
Mike Kravetz

\
 
 \ /
  Last update: 2023-04-06 23:33    [W:0.599 / U:22.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site