mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + mm-hugetlb-fix-racy-resv_huge_pages-underflow-on-uffdio_copy-fix.patch added to -mm tree
@ 2021-06-01 23:19 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-06-01 23:19 UTC (permalink / raw)
  To: almasrymina, axelrasmussen, mike.kravetz, mm-commits, peterx, yuehaibing


The patch titled
     Subject: userfaultfd: remove set but not used variable 'vm_alloc_shared'
has been added to the -mm tree.  Its filename is
     mm-hugetlb-fix-racy-resv_huge_pages-underflow-on-uffdio_copy-fix.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-hugetlb-fix-racy-resv_huge_pages-underflow-on-uffdio_copy-fix.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-hugetlb-fix-racy-resv_huge_pages-underflow-on-uffdio_copy-fix.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: YueHaibing <yuehaibing@huawei.com>
Subject: userfaultfd: remove set but not used variable 'vm_alloc_shared'

mm/userfaultfd.c: In function `__mcopy_atomic_hugetlb':
mm/userfaultfd.c:284:6: warning: variable `vm_alloc_shared' set but not used [-Wunused-but-set-variable]
  int vm_alloc_shared = dst_vma->vm_flags & VM_SHARED;
      ^~~~~~~~~~~~~~~

commit 1786d0012620 ("mm, hugetlb: fix racy resv_huge_pages underflow on UFFDIO_COPY")
left behind this.

Link: https://lkml.kernel.org/r/20210601141610.28332-1-yuehaibing@huawei.com
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Cc: Mina Almasry <almasrymina@google.com>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

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

--- a/mm/userfaultfd.c~mm-hugetlb-fix-racy-resv_huge_pages-underflow-on-uffdio_copy-fix
+++ a/mm/userfaultfd.c
@@ -209,7 +209,6 @@ static __always_inline ssize_t __mcopy_a
 					      unsigned long len,
 					      enum mcopy_atomic_mode mode)
 {
-	int vm_alloc_shared = dst_vma->vm_flags & VM_SHARED;
 	int vm_shared = dst_vma->vm_flags & VM_SHARED;
 	ssize_t err;
 	pte_t *dst_pte;
@@ -308,7 +307,6 @@ retry:
 
 		mutex_unlock(&hugetlb_fault_mutex_table[hash]);
 		i_mmap_unlock_read(mapping);
-		vm_alloc_shared = vm_shared;
 
 		cond_resched();
 
_

Patches currently in -mm which might be from yuehaibing@huawei.com are

mm-dmapool-use-device_attr_ro-macro.patch
mm-hugetlb-fix-racy-resv_huge_pages-underflow-on-uffdio_copy-fix.patch
mm-compaction-use-device_attr_wo-macro.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-01 23:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 23:19 + mm-hugetlb-fix-racy-resv_huge_pages-underflow-on-uffdio_copy-fix.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).