Skip to contentSkip to conversation

mm/uffd: Fix comment in handling pte markers

PATCH Applied Peter Xu 2 participants 2 messages Feb 15, 2023

Subsystems (2)
lore
Share & tools
lore

Peter Xu

author
#0 lore raw

PATCH 1/1 mm/uffd: Fix comment in handling pte markers

The comment is obsolete after f369b07c8614 ("mm/uffd: reset write protection when unregister with wp-mode", 2022-08-20). Remove it.

---
 mm/memory.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
mm/memory.c +1 -3
index 7a04a1130ec1..f456f3b5049c 100644
@@ -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);
Signature · 1 line
2.39.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Peter Xu

The comment is obsolete after f369b07c8614 ("mm/uffd: reset write protection when unregister with wp-mode", 2022-08-20). Remove it.

---
  mm/memory.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)
mm/memory.c +0 -0
index 7a04a1130ec1..f456f3b5049c 100644

mm/memory.c static vm_fault_t pte_marker_handle_uffd_wp(struct vm_fault *vmf) · line 3633

Quoted 10 lines
mm/memory.c +1 -3
@@ -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);
Signature · 3 lines
Thanks,

David / dhildenb