Skip to contentSkip to conversation

mm-userfaultfd-add-new-uffdio_poison-ioctl-fix.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Aug 11, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: userfaultfd: add new UFFDIO_POISON ioctl: fix
has been removed from the -mm tree. Its filename was
mm-userfaultfd-add-new-uffdio_poison-ioctl-fix.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: Hugh Dickins <[email protected]>
Subject: mm: userfaultfd: add new UFFDIO_POISON ioctl: fix
Date: Tue, 11 Jul 2023 18:27:17 -0700 (PDT)

Smatch has observed that pte_offset_map_lock() is now allowed to fail, and then ptl should not be unlocked. Use -EAGAIN here like elsewhere.

---

 mm/userfaultfd.c |    4 ++++
 1 file changed, 4 insertions(+)
mm/userfaultfd.c renamed from mm/userfaultfd.c~mm-userfaultfd-add-new-uffdio_poison-ioctl-fix +4 -0
@@ -300,7 +300,10 @@ static int mfill_atomic_pte_poison(pmd_t
 	spinlock_t *ptl;
 
 	_dst_pte = make_pte_marker(PTE_MARKER_POISONED);
+	ret = -EAGAIN;
 	dst_pte = pte_offset_map_lock(dst_mm, dst_pmd, dst_addr, &ptl);
+	if (!dst_pte)
+		goto out;
 
 	if (mfill_file_over_size(dst_vma, dst_addr)) {
 		ret = -EFAULT;
@@ -319,6 +322,7 @@ static int mfill_atomic_pte_poison(pmd_t
 	ret = 0;
 out_unlock:
 	pte_unmap_unlock(dst_pte, ptl);
+out:
 	return ret;
 }
 

_

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