+ fs-userfaultfdc-simplify-the-calculation-of-new_flags.patch added to -mm tree

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

 



The patch titled
     Subject: fs/userfaultfd.c: simplify the calculation of new_flags
has been added to the -mm tree.  Its filename is
     fs-userfaultfdc-simplify-the-calculation-of-new_flags.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/fs-userfaultfdc-simplify-the-calculation-of-new_flags.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/fs-userfaultfdc-simplify-the-calculation-of-new_flags.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: fs/userfaultfd.c: simplify the calculation of new_flags

Finally new_flags equals old vm_flags *OR* vm_flags.

It is not necessary to mask them first.

Link: http://lkml.kernel.org/r/20190806053859.2374-1-richardw.yang@xxxxxxxxxxxxxxx
Signed-off-by: Wei Yang <richardw.yang@xxxxxxxxxxxxxxx>
Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/userfaultfd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/userfaultfd.c~fs-userfaultfdc-simplify-the-calculation-of-new_flags
+++ a/fs/userfaultfd.c
@@ -1460,7 +1460,7 @@ static int userfaultfd_register(struct u
 			start = vma->vm_start;
 		vma_end = min(end, vma->vm_end);
 
-		new_flags = (vma->vm_flags & ~vm_flags) | vm_flags;
+		new_flags = vma->vm_flags | vm_flags;
 		prev = vma_merge(mm, prev, start, vma_end, new_flags,
 				 vma->anon_vma, vma->vm_file, vma->vm_pgoff,
 				 vma_policy(vma),
_

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

mm-fix-typo-in-the-comment-when-calling-function-__setpageuptodate.patch
mm-mmapc-remove-a-never-trigger-warning-in-__vma_adjust.patch
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
fs-userfaultfdc-simplify-the-calculation-of-new_flags.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