All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-remove-the-vma-linked-list-fix.patch added to mm-unstable branch
@ 2022-05-13 19:39 Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2022-05-13 19:39 UTC (permalink / raw)
  To: mm-commits, sfr, quic_qiancai, Liam.Howlett, liam.howlett, akpm


The patch titled
     Subject: mm/mmap: fix potential leak on do_mas_align_munmap()
has been added to the -mm mm-unstable branch.  Its filename is
     mm-remove-the-vma-linked-list-fix.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-remove-the-vma-linked-list-fix.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

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 via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Liam Howlett <liam.howlett@oracle.com>
Subject: mm/mmap: fix potential leak on do_mas_align_munmap()
Date: Fri, 13 May 2022 14:15:53 +0000

There is a leak when the system is low on resources and fails to allocate
enough memory to complete the munmap task.  Fix this by adding the
necessary free operations in the unwinding.

Link: https://lkml.kernel.org/r/20220513141548.2019143-1-Liam.Howlett@oracle.com
Fixes: a760774e7b7b (mm: start tracking VMAs with maple tree)
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reported-by: Qian Cai <quic_qiancai@quicinc.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/mmap.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/mm/mmap.c~mm-remove-the-vma-linked-list-fix
+++ a/mm/mmap.c
@@ -2394,7 +2394,7 @@ do_mas_align_munmap(struct ma_state *mas
 		return -ENOMEM;
 
 	if (mas_preallocate(&mas_detach, vma, GFP_KERNEL))
-		return -ENOMEM;
+		goto detach_alloc_fail;
 
 	mas->last = end - 1;
 	/*
@@ -2533,6 +2533,8 @@ do_mas_align_munmap(struct ma_state *mas
 map_count_exceeded:
 split_failed:
 userfaultfd_error:
+	mas_destroy(&mas_detach);
+detach_alloc_fail:
 	mas_destroy(mas);
 	return error;
 }
_

Patches currently in -mm which might be from liam.howlett@oracle.com are

maple-tree-add-new-data-structure-fix.patch
lib-test_maple_tree-add-testing-for-maple-tree-fix.patch
mm-start-tracking-vmas-with-maple-tree-fix-2.patch
mm-remove-the-vma-linked-list-fix.patch


^ permalink raw reply	[flat|nested] 3+ messages in thread

* + mm-remove-the-vma-linked-list-fix.patch added to mm-unstable branch
@ 2022-08-24 18:03 Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2022-08-24 18:03 UTC (permalink / raw)
  To: mm-commits, liam.howlett, abaci, yang.lee, akpm


The patch titled
     Subject: mm: fix one kernel-doc comment
has been added to the -mm mm-unstable branch.  Its filename is
     mm-remove-the-vma-linked-list-fix.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-remove-the-vma-linked-list-fix.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

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 via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Yang Li <yang.lee@linux.alibaba.com>
Subject: mm: fix one kernel-doc comment
Date: Wed, 24 Aug 2022 10:19:18 +0800

Add the description for @mt.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=1949
Link: https://lkml.kernel.org/r/20220824021918.94116-1-yang.lee@linux.alibaba.com
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/memory.c |    1 +
 1 file changed, 1 insertion(+)

--- a/mm/memory.c~mm-remove-the-vma-linked-list-fix
+++ a/mm/memory.c
@@ -1697,6 +1697,7 @@ static void unmap_single_vma(struct mmu_
 /**
  * unmap_vmas - unmap a range of memory covered by a list of vma's
  * @tlb: address of the caller's struct mmu_gather
+ * @mt: the maple tree
  * @vma: the starting vma
  * @start_addr: virtual address at which to start unmapping
  * @end_addr: virtual address at which to end unmapping
_

Patches currently in -mm which might be from yang.lee@linux.alibaba.com are

mm-remove-the-vma-linked-list-fix.patch


^ permalink raw reply	[flat|nested] 3+ messages in thread

* + mm-remove-the-vma-linked-list-fix.patch added to mm-unstable branch
@ 2022-06-24 20:31 Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2022-06-24 20:31 UTC (permalink / raw)
  To: mm-commits, Liam.Howlett, hulkci, yangyingliang, akpm


The patch titled
     Subject: mm/mmap: fix error return code in do_mas_align_munmap()
has been added to the -mm mm-unstable branch.  Its filename is
     mm-remove-the-vma-linked-list-fix.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-remove-the-vma-linked-list-fix.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

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 via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Yang Yingliang <yangyingliang@huawei.com>
Subject: mm/mmap: fix error return code in do_mas_align_munmap()
Date: Thu, 23 Jun 2022 21:42:37 +0800

Return error code when munmap_sidetree() fails in do_mas_align_munmap().

Link: https://lkml.kernel.org/r/20220623134237.2127440-1-yangyingliang@huawei.com
Fixes: 81f5504dfb36 ("mm/mmap: change do_mas_align_munmap() to avoid preallocations for sidetree")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reported-by: Hulk Robot <hulkci@huawei.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/mmap.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/mm/mmap.c~mm-remove-the-vma-linked-list-fix
+++ a/mm/mmap.c
@@ -2469,7 +2469,8 @@ do_mas_align_munmap(struct ma_state *mas
 
 			mas_set(mas, end);
 			split = mas_prev(mas, 0);
-			if (munmap_sidetree(split, &mas_detach))
+			error = munmap_sidetree(split, &mas_detach);
+			if (error)
 				goto munmap_sidetree_failed;
 
 			count++;
@@ -2477,7 +2478,8 @@ do_mas_align_munmap(struct ma_state *mas
 				vma = split;
 			break;
 		}
-		if (munmap_sidetree(next, &mas_detach))
+		error = munmap_sidetree(next, &mas_detach);
+		if (error)
 			goto munmap_sidetree_failed;
 
 		count++;
_

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

mm-remove-the-vma-linked-list-fix.patch


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-24 18:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-13 19:39 + mm-remove-the-vma-linked-list-fix.patch added to mm-unstable branch Andrew Morton
2022-06-24 20:31 Andrew Morton
2022-08-24 18:03 Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.