Skip to contentSkip to conversation

mm-mremap-account-memory-on-do_munmap-failure.patch removed from -mm tree

merged [email protected] 1 participant 1 message Dec 15, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/mremap: account memory on do_munmap() failure
has been removed from the -mm tree. Its filename was
mm-mremap-account-memory-on-do_munmap-failure.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Dmitry Safonov <[email protected]>
Subject: mm/mremap: account memory on do_munmap() failure

Patch series "mremap: move_vma() fixes".

This patch (of 6):

move_vma() copies VMA without adding it to account, then unmaps old part of VMA. On failure it unmaps the new VMA. With hacks accounting in munmap is disabled as it's a copy of existing VMA.

Account the memory on munmap() failure which was previously copied into a new VMA.

Fixes commit e2ea83742133 ("[PATCH] mremap: move_vma fixes and cleanup")
Cc Alexander Viro <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Brian Geffon <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Dan Williams <[email protected]>
Cc Dave Jiang <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "Kirill A. Shutemov" <[email protected]>
Cc Mike Kravetz <[email protected]>
Cc Minchan Kim <[email protected]>
Cc Russell King <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vishal Verma <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Will Deacon <[email protected]>
Cc Dan Carpenter <[email protected]>
Cc John Hubbard <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Ralph Campbell <[email protected]>

---

 mm/mremap.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
mm/mremap.c renamed from mm/mremap.c~mm-mremap-account-memory-on-do_munmap-failure +2 -1
@@ -600,7 +600,8 @@ static unsigned long move_vma(struct vm_
 
 	if (do_munmap(mm, old_addr, old_len, uf_unmap) < 0) {
 		/* OOM: unable to split vma, just get accounts right */
-		vm_unacct_memory(excess >> PAGE_SHIFT);
+		if (vm_flags & VM_ACCOUNT)
+			vm_acct_memory(new_len >> PAGE_SHIFT);
 		excess = 0;
 	}
 

_

Patches currently in -mm which might be from [email protected] are