Skip to contentSkip to conversation

mm-fix-failure-to-unmap-pte-on-highmem-systems.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jun 9, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: fix failure to unmap pte on highmem systems
has been removed from the -mm tree. Its filename was
mm-fix-failure-to-unmap-pte-on-highmem-systems.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Ryan Roberts <[email protected]>
Subject: mm: fix failure to unmap pte on highmem systems
Date: Fri, 2 Jun 2023 10:29:49 +0100

The loser of a race to service a pte for a device private entry in the swap path previously unlocked the ptl, but failed to unmap the pte. This only affects highmem systems since unmapping a pte is a noop on non-highmem systems.

Fixes 16ce101db85d ("mm/memory.c: fix race when faulting a device private page")
Cc Christoph Hellwig <[email protected]>
Cc Kirill A. Shutemov <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc Matthew Wilcox (Oracle) <[email protected]>
Cc SeongJae Park <[email protected]>
Cc Uladzislau Rezki (Sony) <[email protected]>
Cc Yu Zhao <[email protected]>

---

 mm/memory.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
mm/memory.c renamed from mm/memory.c~mm-fix-failure-to-unmap-pte-on-highmem-systems +2 -4
@@ -3728,10 +3728,8 @@ vm_fault_t do_swap_page(struct vm_fault
 			vmf->page = pfn_swap_entry_to_page(entry);
 			vmf->pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd,
 					vmf->address, &vmf->ptl);
-			if (unlikely(!pte_same(*vmf->pte, vmf->orig_pte))) {
-				spin_unlock(vmf->ptl);
-				goto out;
-			}
+			if (unlikely(!pte_same(*vmf->pte, vmf->orig_pte)))
+				goto unlock;
 
 			/*
 			 * Get a page reference while we know the page can't be

_

Patches currently in -mm which might be from [email protected] are