Skip to contentSkip to conversation

habanalabs-remove-foll_force-usage.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Dec 1, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: habanalabs: remove FOLL_FORCE usage
has been removed from the -mm tree. Its filename was
habanalabs-remove-foll_force-usage.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: David Hildenbrand <[email protected]>
Subject: habanalabs: remove FOLL_FORCE usage
Date: Wed, 16 Nov 2022 11:26:58 +0100

FOLL_FORCE is really only for ptrace access. As we unpin the pinned pages using unpin_user_pages_dirty_lock(true), the assumption is that all these pages are writable.

FOLL_FORCE in this case seems to be due to copy-and-past from other drivers. Let's just remove it.

---

 drivers/misc/habanalabs/common/memory.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/misc/habanalabs/common/memory.c renamed from drivers/misc/habanalabs/common/memory.c~habanalabs-remove-foll_force-usage +1 -2
@@ -2312,8 +2312,7 @@ static int get_user_memory(struct hl_dev
 	if (!userptr->pages)
 		return -ENOMEM;
 
-	rc = pin_user_pages_fast(start, npages,
-				 FOLL_FORCE | FOLL_WRITE | FOLL_LONGTERM,
+	rc = pin_user_pages_fast(start, npages, FOLL_WRITE | FOLL_LONGTERM,
 				 userptr->pages);
 
 	if (rc != npages) {

_

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

selftests-vm-add-ksm-unmerge-tests.patch mm-pagewalk-dont-trigger-test_walk-in-walk_page_vma.patch selftests-vm-add-test-to-measure-madv_unmergeable-performance.patch mm-ksm-simplify-break_ksm-to-not-rely-on-vm_fault_write.patch mm-remove-vm_fault_write.patch mm-ksm-fix-ksm-cow-breaking-with-userfaultfd-wp-via-fault_flag_unshare.patch mm-pagewalk-add-walk_page_range_vma.patch mm-ksm-convert-break_ksm-to-use-walk_page_range_vma.patch mm-gup-remove-foll_migration.patch