tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
pending-5.4
head: 1f9e7a61c29e139420352f203f2aa2bad3bac189
commit: 25b543df1007266478f6e995ad92f1a5c51d8525 [226/320] s390/gmap: validate VMA in
__gmap_zap()
config: s390-buildonly-randconfig-r002-20211114 (attached as .config)
compiler: s390-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-stable pending-5.4
git checkout 25b543df1007266478f6e995ad92f1a5c51d8525
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
arch/s390/mm/gmap.c: In function '__gmap_zap':
arch/s390/mm/gmap.c:687:23: error: implicit declaration of function
'vma_lookup'; did you mean 'key_lookup'?
[-Werror=implicit-function-declaration]
687 | vma = vma_lookup(gmap->mm, vmaddr);
| ^~~~~~~~~~
| key_lookup
> arch/s390/mm/gmap.c:687:21: warning: assignment to 'struct
vm_area_struct *' from 'int' makes pointer from integer without a cast
[-Wint-conversion]
687 | vma = vma_lookup(gmap->mm,
vmaddr);
| ^
cc1: some warnings being treated as errors
vim +687 arch/s390/mm/gmap.c
670
671 /*
672 * this function is assumed to be called with mmap_sem held
673 */
674 void __gmap_zap(struct gmap *gmap, unsigned long gaddr)
675 {
676 struct vm_area_struct *vma;
677 unsigned long vmaddr;
678 spinlock_t *ptl;
679 pte_t *ptep;
680
681 /* Find the vm address for the guest address */
682 vmaddr = (unsigned long) radix_tree_lookup(&gmap->guest_to_host,
683 gaddr >> PMD_SHIFT);
684 if (vmaddr) {
685 vmaddr |= gaddr & ~PMD_MASK;
686
687 vma = vma_lookup(gmap->mm, vmaddr);
688 if (!vma
|| is_vm_hugetlb_page(vma))
689 return;
690
691 /* Get pointer to the page table entry */
692 ptep = get_locked_pte(gmap->mm, vmaddr, &ptl);
693 if (likely(ptep))
694 ptep_zap_unused(gmap->mm, vmaddr, ptep, 0);
695 pte_unmap_unlock(ptep, ptl);
696 }
697 }
698 EXPORT_SYMBOL_GPL(__gmap_zap);
699
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org