mbox series

[0/3] mm/vma: miss to restore vmi.index on expansion failure

Message ID 20241025031847.6274-1-richard.weiyang@gmail.com (mailing list archive)
Headers show
Series mm/vma: miss to restore vmi.index on expansion failure | expand

Message

Wei Yang Oct. 25, 2024, 3:18 a.m. UTC
This serial starts on spotting on miss to restore vmi.index in
vma_merge_new_range() when expansion is failed.

Patch 2 add a test to assert this.

While found build error on old platform, because parameter name missing. Patch
3 is to fix this.

Wei Yang (3):
  mm/vma: miss to restore vmi.index on expansion failure
  tools: test vmi.index would be restored on merge failure
  tools: fix build error on parameter name omitted

 mm/vma.c                         | 10 ++--
 tools/testing/vma/vma.c          |  8 +++-
 tools/testing/vma/vma_internal.h | 82 ++++++++++++++++----------------
 3 files changed, 55 insertions(+), 45 deletions(-)

Comments

Liam R. Howlett Oct. 25, 2024, 8:06 p.m. UTC | #1
* Wei Yang <richard.weiyang@gmail.com> [241024 23:18]:
> This serial starts on spotting on miss to restore vmi.index in
> vma_merge_new_range() when expansion is failed.
> 
> Patch 2 add a test to assert this.
> 
> While found build error on old platform, because parameter name missing. Patch
> 3 is to fix this.

Just to make sure I understand; this series isn't happening now?

Thanks,
Liam

> 
> Wei Yang (3):
>   mm/vma: miss to restore vmi.index on expansion failure
>   tools: test vmi.index would be restored on merge failure
>   tools: fix build error on parameter name omitted
> 
>  mm/vma.c                         | 10 ++--
>  tools/testing/vma/vma.c          |  8 +++-
>  tools/testing/vma/vma_internal.h | 82 ++++++++++++++++----------------
>  3 files changed, 55 insertions(+), 45 deletions(-)
> 
> -- 
> 2.34.1
>
Lorenzo Stoakes Oct. 25, 2024, 8:14 p.m. UTC | #2
On Fri, Oct 25, 2024 at 04:06:39PM -0400, Liam R. Howlett wrote:
> * Wei Yang <richard.weiyang@gmail.com> [241024 23:18]:
> > This serial starts on spotting on miss to restore vmi.index in
> > vma_merge_new_range() when expansion is failed.
> >
> > Patch 2 add a test to assert this.
> >
> > While found build error on old platform, because parameter name missing. Patch
> > 3 is to fix this.
>
> Just to make sure I understand; this series isn't happening now?

Nope.

I already folded the pertinent bit (me mistakenly doing a pointless compare and
mas->index/end write which later gets overwritten) into the mmap-region series
where we just get rid of this code altogether as it's nnnnnecessary and
horrible.

Great spot from Wei but I think this is the better approach.

>
> Thanks,
> Liam
>
> >
> > Wei Yang (3):
> >   mm/vma: miss to restore vmi.index on expansion failure
> >   tools: test vmi.index would be restored on merge failure
> >   tools: fix build error on parameter name omitted
> >
> >  mm/vma.c                         | 10 ++--
> >  tools/testing/vma/vma.c          |  8 +++-
> >  tools/testing/vma/vma_internal.h | 82 ++++++++++++++++----------------
> >  3 files changed, 55 insertions(+), 45 deletions(-)
> >
> > --
> > 2.34.1
> >
>