linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm.h: Fix "mm: Add temporary vma iterator versions of vma_merge(), split_vma(), and __split_vma()
@ 2023-01-09 20:53 Liam Howlett
  2023-01-09 23:15 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Liam Howlett @ 2023-01-09 20:53 UTC (permalink / raw)
  To: linux-mm, linux-kernel, Andrew Morton, maple-tree
  Cc: Liam Howlett, SeongJae Park

The extern definition of __split_vma() was removed too early.  Re-add it
and remove it once the users are all converted.

Reported-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
---
 include/linux/mm.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index 9c790c88f691..14e3698fcbe7 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2840,6 +2840,8 @@ extern struct vm_area_struct *vmi_vma_merge(struct vma_iterator *vmi,
 	struct file *, pgoff_t, struct mempolicy *, struct vm_userfaultfd_ctx,
 	struct anon_vma_name *);
 extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *);
+extern int __split_vma(struct mm_struct *, struct vm_area_struct *,
+			       unsigned long addr, int new_below);
 extern int vmi__split_vma(struct vma_iterator *vmi, struct mm_struct *,
 	struct vm_area_struct *, unsigned long addr, int new_below);
 extern int split_vma(struct mm_struct *, struct vm_area_struct *,
-- 
2.35.1

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

* Re: [PATCH] mm.h: Fix "mm: Add temporary vma iterator versions of vma_merge(), split_vma(), and __split_vma()
  2023-01-09 20:53 [PATCH] mm.h: Fix "mm: Add temporary vma iterator versions of vma_merge(), split_vma(), and __split_vma() Liam Howlett
@ 2023-01-09 23:15 ` Andrew Morton
  2023-01-10 14:14   ` Liam Howlett
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2023-01-09 23:15 UTC (permalink / raw)
  To: Liam Howlett; +Cc: linux-mm, linux-kernel, maple-tree, SeongJae Park

On Mon, 9 Jan 2023 20:53:22 +0000 Liam Howlett <liam.howlett@oracle.com> wrote:

> The extern definition of __split_vma() was removed too early.  Re-add it
> and remove it once the users are all converted.

I think I sorted this out.

__split_vma() can be made static to mmap.c?

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

* Re: [PATCH] mm.h: Fix "mm: Add temporary vma iterator versions of vma_merge(), split_vma(), and __split_vma()
  2023-01-09 23:15 ` Andrew Morton
@ 2023-01-10 14:14   ` Liam Howlett
  2023-01-10 15:06     ` Sven Schnelle
  0 siblings, 1 reply; 4+ messages in thread
From: Liam Howlett @ 2023-01-10 14:14 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, linux-kernel, maple-tree, SeongJae Park

* Andrew Morton <akpm@linux-foundation.org> [230109 18:15]:
> On Mon, 9 Jan 2023 20:53:22 +0000 Liam Howlett <liam.howlett@oracle.com> wrote:
> 
> > The extern definition of __split_vma() was removed too early.  Re-add it
> > and remove it once the users are all converted.
> 
> I think I sorted this out.
> 
> __split_vma() can be made static to mmap.c?

Ah, I don't think so?  SeongJae reported an issue that I caused by
dropping this definition from the header before mm/madvise.c was updated
to use the alternative.  I think it needs to be in the header and so it
should just probably be there until the function is dropped entirely
later in the series.

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

* Re: [PATCH] mm.h: Fix "mm: Add temporary vma iterator versions of vma_merge(), split_vma(), and __split_vma()
  2023-01-10 14:14   ` Liam Howlett
@ 2023-01-10 15:06     ` Sven Schnelle
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Schnelle @ 2023-01-10 15:06 UTC (permalink / raw)
  To: Liam Howlett
  Cc: Andrew Morton, linux-mm, linux-kernel, maple-tree, SeongJae Park

Liam Howlett <liam.howlett@oracle.com> writes:

> * Andrew Morton <akpm@linux-foundation.org> [230109 18:15]:
>> On Mon, 9 Jan 2023 20:53:22 +0000 Liam Howlett <liam.howlett@oracle.com> wrote:
>> 
>> > The extern definition of __split_vma() was removed too early.  Re-add it
>> > and remove it once the users are all converted.
>> 
>> I think I sorted this out.
>> 
>> __split_vma() can be made static to mmap.c?
>
> Ah, I don't think so?  SeongJae reported an issue that I caused by
> dropping this definition from the header before mm/madvise.c was updated
> to use the alternative.  I think it needs to be in the header and so it
> should just probably be there until the function is dropped entirely
> later in the series.

FWIW, i encountered that issue while bisecting another maple tree issue
with next-20230110:

linux/mm/madvise.c: In function ‘madvise_update_vma’:
linux/mm/madvise.c:165:25: error: implicit declaration of function ‘__split_vma’; did you mean ‘split_vma’? [-Werror=implicit-function-declaration]
  165 |                 error = __split_vma(mm, vma, start, 1);
      |                         ^~~~~~~~~~~
      |                         split_vma
cc1: some warnings being treated as errors
make[3]: *** [linux/scripts/Makefile.build:252: mm/madvise.o] Error 1
make[2]: *** [linux/scripts/Makefile.build:504: mm] Error 2
make[1]: *** [linux/Makefile:2008: .] Error 2

Can we instead fix the original patch instead, so bisect works, or is
it too late?

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

end of thread, other threads:[~2023-01-10 15:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09 20:53 [PATCH] mm.h: Fix "mm: Add temporary vma iterator versions of vma_merge(), split_vma(), and __split_vma() Liam Howlett
2023-01-09 23:15 ` Andrew Morton
2023-01-10 14:14   ` Liam Howlett
2023-01-10 15:06     ` Sven Schnelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).