+ userfaultfd-remove-unnecessary-warn_on-in-__mcopy_atomic_hugetlb.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: userfaultfd: remove unnecessary WARN_ON() in __mcopy_atomic_hugetlb()
has been added to the -mm tree.  Its filename is
     userfaultfd-remove-unnecessary-warn_on-in-__mcopy_atomic_hugetlb.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/userfaultfd-remove-unnecessary-warn_on-in-__mcopy_atomic_hugetlb.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/userfaultfd-remove-unnecessary-warn_on-in-__mcopy_atomic_hugetlb.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Wei Yang <richardw.yang@xxxxxxxxxxxxxxx>
Subject: userfaultfd: remove unnecessary WARN_ON() in __mcopy_atomic_hugetlb()

These warning here is to make sure address(dst_addr) and length(len -
copied) are huge page size aligned.

While this is ensured by:

    dst_start and len is huge page size aligned
    dst_addr equals to dst_start and increase huge page size each time
    copied increase huge page size each time

This means these warnings will never be triggered.

Link: http://lkml.kernel.org/r/20190927070032.2129-2-richardw.yang@xxxxxxxxxxxxxxx
Signed-off-by: Wei Yang <richardw.yang@xxxxxxxxxxxxxxx>
Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx>
Cc: Hugh Dickins <hughd@xxxxxxxxxx>
Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/userfaultfd.c |    5 -----
 1 file changed, 5 deletions(-)

--- a/mm/userfaultfd.c~userfaultfd-remove-unnecessary-warn_on-in-__mcopy_atomic_hugetlb
+++ a/mm/userfaultfd.c
@@ -243,10 +243,6 @@ retry:
 		vm_shared = dst_vma->vm_flags & VM_SHARED;
 	}
 
-	if (WARN_ON(dst_addr & (vma_hpagesize - 1) ||
-		    (len - copied) & (vma_hpagesize - 1)))
-		goto out_unlock;
-
 	/*
 	 * If not shared, ensure the dst_vma has a anon_vma.
 	 */
@@ -262,7 +258,6 @@ retry:
 		pte_t dst_pteval;
 
 		BUG_ON(dst_addr >= dst_start + len);
-		VM_BUG_ON(dst_addr & (vma_hpagesize - 1));
 
 		/*
 		 * Serialize via hugetlb_fault_mutex
_

Patches currently in -mm which might be from richardw.yang@xxxxxxxxxxxxxxx are

userfaultfd-use-vma_pagesize-for-all-huge-page-size-calculation.patch
userfaultfd-remove-unnecessary-warn_on-in-__mcopy_atomic_hugetlb.patch
userfaultfd-wrap-the-common-dst_vma-check-into-an-inlined-function.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux