* + mm-mremap-do-not-set-vrm-vma-null-immediately-prior-to-checking-it.patch added to mm-unstable branch
@ 2025-03-30 21:23 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-03-30 21:23 UTC (permalink / raw)
To: mm-commits, vbabka, Liam.Howlett, harry.yoo, lorenzo.stoakes,
akpm
The patch titled
Subject: mm/mremap: do not set vrm->vma NULL immediately prior to checking it
has been added to the -mm mm-unstable branch. Its filename is
mm-mremap-do-not-set-vrm-vma-null-immediately-prior-to-checking-it.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-mremap-do-not-set-vrm-vma-null-immediately-prior-to-checking-it.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: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Subject: mm/mremap: do not set vrm->vma NULL immediately prior to checking it
Date: Sun, 30 Mar 2025 17:20:48 +0100
This seems rather unwise. If we cannot merge, extend, then we need to
recall the original VMA to see if we need to uncharge.
If we do need to, do so.
Link: https://lkml.kernel.org/r/b2fb6b9c-376d-4e9b-905e-26d847fd3865@lucifer.local
Fixes: d5c8aec0542e ("mm/mremap: initial refactor of move_vma()")
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reported-=by: "Lai, Yi" <yi1.lai@linux.intel.com>
Closes: https://lore.kernel.org/linux-mm/Z+lcvEIHMLiKVR1i@ly-workstation/
Cc: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/mremap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/mm/mremap.c~mm-mremap-do-not-set-vrm-vma-null-immediately-prior-to-checking-it
+++ a/mm/mremap.c
@@ -1561,11 +1561,12 @@ static unsigned long expand_vma_in_place
* adjacent to the expanded vma and otherwise
* compatible.
*/
- vma = vrm->vma = vma_merge_extend(&vmi, vma, vrm->delta);
+ vma = vma_merge_extend(&vmi, vma, vrm->delta);
if (!vma) {
vrm_uncharge(vrm);
return -ENOMEM;
}
+ vrm->vma = vma;
vrm_stat_account(vrm, vrm->delta);
_
Patches currently in -mm which might be from lorenzo.stoakes@oracle.com are
mm-mremap-do-not-set-vrm-vma-null-immediately-prior-to-checking-it.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-03-30 21:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-30 21:23 + mm-mremap-do-not-set-vrm-vma-null-immediately-prior-to-checking-it.patch added to mm-unstable branch 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.