Skip to contentSkip to conversation

linux-next: build failure after merge of the mm tree

DISCUSSION Stephen Rothwell 2 participants 2 messages Mar 6, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the mm tree, today's linux-next build (various) failed like this:

mm/khugepaged.c:1702:9: error: implicit declaration of function ‘vma_try_start_write’; did you mean ‘vma_start_write’? [-Werror=implicit-function-declaration]

Caused by commit

92e3612279f9 ("mm/khugepaged: fix vm_lock/i_mmap_rwsem inversion in retract_page_tables")

The definition of vma_try_start_write() is protected by CONFIG_PER_VMA_LOCK, but its use is not.

Signature · 2 lines
Cheers,
Stephen Rothwell
maintainer
#1 lore raw
Quoted 5 lines · On Mon, 6 Mar 2023 13:54:47 +1100 Stephen Rothwell <[email protected]> wrote:

Hi all,

After merging the mm tree, today's linux-next build (various) failed like this:

Quoted 8 lines

mm/khugepaged.c:1702:9: error: implicit declaration of function ‘vma_try_start_write’; did you mean ‘vma_start_write’? [-Werror=implicit-function-declaration]

Caused by commit

92e3612279f9 ("mm/khugepaged: fix vm_lock/i_mmap_rwsem inversion in retract_page_tables")

The definition of vma_try_start_write() is protected by CONFIG_PER_VMA_LOCK, but its use is not.

Thanks. Suren has a fix, but I haven't pushed it out yet :(

From: Suren Baghdasaryan <[email protected]>
Subject: txt-mm-khugepaged-write-lock-vma-while-collapsing-a-huge-page-fix-fix
Date: Sat, 4 Mar 2023 15:24:15 -0800

I missed vma_try_start_write() definition for CONFIG_PER_VMA_LOCK=n configuration.

---

include/linux/mm.h renamed from include/linux/mm.h~mm-khugepaged-write-lock-vma-while-collapsing-a-huge-page-fix-fix +2 -0
@@ -717,6 +717,8 @@ static inline bool vma_start_read(struct
 		{ return false; }
 static inline void vma_end_read(struct vm_area_struct *vma) {}
 static inline void vma_start_write(struct vm_area_struct *vma) {}
+static inline bool vma_try_start_write(struct vm_area_struct *vma)
+		{ return true; }
 static inline void vma_assert_write_locked(struct vm_area_struct *vma) {}
 
 #endif /* CONFIG_PER_VMA_LOCK */

_