From: Peter Xu <peterx@redhat.com>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [linux-next:master 11904/12006] include/linux/hugetlb.h:1262:56: error: invalid use of undefined type 'struct hugetlb_vma_lock'
Date: Wed, 30 Nov 2022 10:40:28 -0500 [thread overview]
Message-ID: <Y4d5bLjo8ggay37M@x1n> (raw)
In-Reply-To: <202211302059.vIaoimsf-lkp@intel.com>
On Wed, Nov 30, 2022 at 08:33:11PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 700e0cd3a5ce6a2cb90d9a2aab729b52f092a7d6
> commit: 98438ed47d60a6d30d5d2ad9c8786a0b92ca23f2 [11904/12006] mm/hugetlb: introduce hugetlb_walk()
> config: i386-randconfig-r004-20221128
> compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
> reproduce (this is a W=1 build):
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=98438ed47d60a6d30d5d2ad9c8786a0b92ca23f2
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout 98438ed47d60a6d30d5d2ad9c8786a0b92ca23f2
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> In file included from arch/x86/include/asm/bug.h:87,
> from include/linux/bug.h:5,
> from include/linux/thread_info.h:13,
> from arch/x86/include/asm/preempt.h:7,
> from include/linux/preempt.h:78,
> from include/linux/spinlock.h:56,
> from include/linux/wait.h:9,
> from include/linux/wait_bit.h:8,
> from include/linux/fs.h:6,
> from fs/ubifs/ubifs.h:16,
> from fs/ubifs/file.c:40:
> include/linux/hugetlb.h: In function 'hugetlb_walk':
> >> include/linux/hugetlb.h:1262:56: error: invalid use of undefined type 'struct hugetlb_vma_lock'
> 1262 | WARN_ON_ONCE(!lockdep_is_held(&vma_lock->rw_sema) &&
> | ^~
> include/asm-generic/bug.h:110:32: note: in definition of macro 'WARN_ON_ONCE'
> 110 | int __ret_warn_on = !!(condition); \
> | ^~~~~~~~~
> include/linux/hugetlb.h:1262:31: note: in expansion of macro 'lockdep_is_held'
> 1262 | WARN_ON_ONCE(!lockdep_is_held(&vma_lock->rw_sema) &&
> | ^~~~~~~~~~~~~~~
> --
> In file included from arch/x86/include/asm/bug.h:87,
> from include/linux/bug.h:5,
> from include/linux/fortify-string.h:5,
> from include/linux/string.h:253,
> from include/linux/bitmap.h:11,
> from include/linux/cpumask.h:12,
> from include/linux/smp.h:13,
> from include/linux/lockdep.h:14,
> from include/linux/mutex.h:17,
> from include/linux/notifier.h:14,
> from include/linux/clk.h:14,
> from lib/vsprintf.c:22:
> include/linux/hugetlb.h: In function 'hugetlb_walk':
> >> include/linux/hugetlb.h:1262:56: error: invalid use of undefined type 'struct hugetlb_vma_lock'
> 1262 | WARN_ON_ONCE(!lockdep_is_held(&vma_lock->rw_sema) &&
> | ^~
> include/asm-generic/bug.h:110:32: note: in definition of macro 'WARN_ON_ONCE'
> 110 | int __ret_warn_on = !!(condition); \
> | ^~~~~~~~~
> include/linux/hugetlb.h:1262:31: note: in expansion of macro 'lockdep_is_held'
> 1262 | WARN_ON_ONCE(!lockdep_is_held(&vma_lock->rw_sema) &&
> | ^~~~~~~~~~~~~~~
> lib/vsprintf.c: In function 'va_format':
> lib/vsprintf.c:1685:9: warning: function 'va_format' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
> 1685 | buf += vsnprintf(buf, end > buf ? end - buf : 0, va_fmt->fmt, va);
> | ^~~
>
>
> vim +1262 include/linux/hugetlb.h
>
> 1243
> 1244 /*
> 1245 * Safe version of huge_pte_offset() to check the locks. See comments
> 1246 * above huge_pte_offset().
> 1247 */
> 1248 static inline pte_t *
> 1249 hugetlb_walk(struct vm_area_struct *vma, unsigned long addr, unsigned long sz)
> 1250 {
> 1251 #if defined(CONFIG_ARCH_WANT_HUGE_PMD_SHARE) && defined(CONFIG_LOCKDEP)
> 1252 struct hugetlb_vma_lock *vma_lock = vma->vm_private_data;
> 1253
> 1254 /*
> 1255 * If pmd sharing possible, locking needed to safely walk the
> 1256 * hugetlb pgtables. More information can be found at the comment
> 1257 * above huge_pte_offset() in the same file.
> 1258 *
> 1259 * NOTE: lockdep_is_held() is only defined with CONFIG_LOCKDEP.
> 1260 */
> 1261 if (__vma_shareable_flags_pmd(vma))
> > 1262 WARN_ON_ONCE(!lockdep_is_held(&vma_lock->rw_sema) &&
> 1263 !lockdep_is_held(
> 1264 &vma->vm_file->f_mapping->i_mmap_rwsem));
> 1265 #endif
> 1266 return huge_pte_offset(vma->vm_mm, addr, sz);
> 1267 }
> 1268
>
> --
> 0-DAY CI Kernel Test Service
> https://01.org/lkp
[...]
> CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
This looks like the same issue as what Eric reported here:
https://lore.kernel.org/all/Y4d4qh0ACmo455Nj@x1n/
Thanks,
--
Peter Xu
prev parent reply other threads:[~2022-11-30 15:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-30 12:33 kernel test robot
2022-11-30 15:40 ` Peter Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y4d5bLjo8ggay37M@x1n \
--to=peterx@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox