]> www.infradead.org Git - users/hch/misc.git/commit
mm: userfaultfd: move_pages_pte() use pte_offset_map_rw_nolock()
authorQi Zheng <zhengqi.arch@bytedance.com>
Thu, 26 Sep 2024 06:46:24 +0000 (14:46 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 6 Nov 2024 00:56:28 +0000 (16:56 -0800)
commite9c74b5431632d2ca60725ffff6fc1fe2b80f246
tree0987de624b2de062395576d19e0c66542e768dd9
parent04965da7a4af790d99c360e79b00bd1f93f80eb1
mm: userfaultfd: move_pages_pte() use pte_offset_map_rw_nolock()

In move_pages_pte(), we may modify the dst_pte and src_pte after acquiring
the ptl, so convert it to using pte_offset_map_rw_nolock().  But since we
will use pte_same() to detect the change of the pte entry, there is no
need to get pmdval, so just pass a dummy variable to it.

Link: https://lkml.kernel.org/r/1530e8fdbfc72eacf3b095babe139ce3d715600a.1727332572.git.zhengqi.arch@bytedance.com
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Reviewed-by: Muchun Song <muchun.song@linux.dev>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mike Rapoport (Microsoft) <rppt@kernel.org>
Cc: Peter Xu <peterx@redhat.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/userfaultfd.c