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

From: Mike Kravetz
Date: Thu Sep 15 2022 - 12:37:38 EST


On 09/15/22 17:07, Stephen Rothwell wrote:
> 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.

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.