Skip to content

Commit

Permalink
mm/uffd: fix comment in handling pte markers
Browse files Browse the repository at this point in the history
The comment is obsolete after f369b07 ("mm/uffd: reset write
protection when unregister with wp-mode", 2022-08-20).  Remove it.

Link: https://lkml.kernel.org/r/20230215205800.223549-1-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Peter Xu authored and Andrew Morton committed Feb 20, 2023
1 parent cd77558 commit 7a079ba
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -3627,9 +3627,7 @@ static vm_fault_t pte_marker_handle_uffd_wp(struct vm_fault *vmf)
{
/*
* Just in case there're leftover special ptes even after the region
* got unregistered - we can simply clear them. We can also do that
* proactively when e.g. when we do UFFDIO_UNREGISTER upon some uffd-wp
* ranges, but it should be more efficient to be done lazily here.
* got unregistered - we can simply clear them.
*/
if (unlikely(!userfaultfd_wp(vmf->vma) || vma_is_anonymous(vmf->vma)))
return pte_marker_clear(vmf);
Expand Down

0 comments on commit 7a079ba

Please sign in to comment.