diff options
author | Wei Yang <richardw.yang@linux.intel.com> | 2019-12-01 02:57:52 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-12-01 21:59:10 +0100 |
commit | 53eaa14b62d27f3011feb97e12a80bf61a4b29ab (patch) | |
tree | 03f96cbc9f83f363c0826a859a6d70cfdbe62cbe | |
parent | userfaultfd: use vma_pagesize for all huge page size calculation (diff) | |
download | linux-53eaa14b62d27f3011feb97e12a80bf61a4b29ab.tar.xz linux-53eaa14b62d27f3011feb97e12a80bf61a4b29ab.zip |
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@linux.intel.com
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r-- | mm/userfaultfd.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c index c545ee84331d..07f44555fd03 100644 --- a/mm/userfaultfd.c +++ b/mm/userfaultfd.c @@ -242,10 +242,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. */ @@ -259,7 +255,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 |