Re: [PATCH v2 06/10] mm: avoid using vma_merge() for new VMAs
From: Mark Brown
Date: Fri Aug 30 2024 - 08:59:50 EST
On Thu, Aug 29, 2024 at 10:22:53PM +0100, Lorenzo Stoakes wrote:
> Thanks, I figured out the problem, it's not arm-specific, I was running
> self-tests but eyeballing-failure resulted in me missing this.
>
> This is a product of vma_merge_extend() invoking vma_merge_new_range() without
> having determined the next VMA correctly, after moving from vma_merge() (which
> looked this up for us) to vma_merge_new_range() (which does not).
>
> This is after having adjusted the assumptions between v1 and v2 of the series in
> each merge function, and I simply missed this mremap()-specific case.
>
> Andrew - I enclose a fix-patch to get a fix out for this asap, but I am due a
> respin relatively soon and will also include that in this.
>
> ----8<----
> From 3678f8a53f98de52f11946d4d32e6fb239d11c2f Mon Sep 17 00:00:00 2001
> From: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
> Date: Thu, 29 Aug 2024 22:18:02 +0100
> Subject: [PATCH] mm: correctly determine vmg.next in vma_merge_extend()
>
> vma_merge_next_range() requires that the caller specify prev AND next.
This fixes the problem for me.
Tested-by: Mark Brown <broonie@xxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature