Skip to contentSkip to conversation

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

DISCUSSION Stephen Rothwell 3 participants 3 messages Sep 15, 2022

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

Hi all,

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

ld: warning: discarding dynamic section .glink
ld: warning: discarding dynamic section .plt
ld: linkage table error against `hugetlb_vma_lock_release'
ld: stubs don't match calculated size
ld: can not build stubs: bad value
ld: fs/hugetlbfs/inode.o: in function `.remove_inode_hugepages':
inode.c:(.text+0x2538): undefined reference to `.hugetlb_vma_lock_release'
ld: inode.c:(.text+0x25f4): undefined reference to `.hugetlb_vma_lock_release'

Caused by commits

d56100904028 ("hugetlb: use new vma_lock for pmd sharing synchronization") 47bc61e7caf9 ("hugetlb: add vma based lock for pmd sharing")

The definition of hugetlb_vma_lock_release() is guarded by CONFIG_ARCH_WANT_HUGE_PMD_SHARE, but the usage in fs/hugetlbfs/inode.c is not.

I have reverted commit d56100904028 (and the following commit) for today.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 14 lines · Stephen Rothwell

Hi all,

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

ld: warning: discarding dynamic section .glink
ld: warning: discarding dynamic section .plt
ld: linkage table error against `hugetlb_vma_lock_release'
ld: stubs don't match calculated size
ld: can not build stubs: bad value
ld: fs/hugetlbfs/inode.o: in function `.remove_inode_hugepages':
inode.c:(.text+0x2538): undefined reference to `.hugetlb_vma_lock_release'
ld: inode.c:(.text+0x25f4): undefined reference to `.hugetlb_vma_lock_release'

Quoted 8 lines

Caused by commits

d56100904028 ("hugetlb: use new vma_lock for pmd sharing synchronization") 47bc61e7caf9 ("hugetlb: add vma based lock for pmd sharing")

The definition of hugetlb_vma_lock_release() is guarded by CONFIG_ARCH_WANT_HUGE_PMD_SHARE, but the usage in fs/hugetlbfs/inode.c is not.

Sorry about that! When thinking about the need for a stub, I only considered the !CONFIG_HUGETLB_PAGE case. :(

Andrew, the following change to 47bc61e7caf9 ("hugetlb: add vma based lock for pmd sharing") will fix the issue. Would you like to just add the fix, or would you like another version of 47bc61e7caf9, or perhaps another version of the series? Happy to do whatever is easier for you.

From 8b3031350154e8e401ccfbc5e71cb95ef654d017 Mon Sep 17 00:00:00 2001
From: Mike Kravetz <[email protected]>
Date: Thu, 15 Sep 2022 09:33:44 -0700
Subject: [PATCH] hugetlb: fix build issue for missing hugetlb_vma_lock_release

Add a stub for hugetlb_vma_lock_release to build in the case CONFIG_HUGETLB_PAGE && !CONFIG_ARCH_WANT_HUGE_PMD_SHARE.

---
 mm/hugetlb.c | 4 ++++
 1 file changed, 4 insertions(+)
mm/hugetlb.c +4 -0
index 2207300791e5..cc7877da18d7 100644
@@ -7008,6 +7008,10 @@ void hugetlb_vma_assert_locked(struct vm_area_struct *vma)
 {
 }
 
+void hugetlb_vma_lock_release(struct kref *kref)
+{
+}
+
 static void hugetlb_vma_lock_free(struct vm_area_struct *vma)
 {
 }
Signature · 1 line
2.37.2
maintainer
#2 lore raw
Quoted 4 lines · On Thu, 15 Sep 2022 09:37:08 -0700 Mike Kravetz <[email protected]> wrote:

Andrew, the following change to 47bc61e7caf9 ("hugetlb: add vma based lock for pmd sharing") will fix the issue. Would you like to just add the fix, or would you like another version of 47bc61e7caf9, or perhaps another version of the series? Happy to do whatever is easier for you.

This simple fix is easiest for me. More importantly, I think it's easier for reviewers, who don't have to plough through a whole new series unsure what might have changed.