tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
pending-4.9
head: 1d9ee2ed0ebfa7cca1286ea38ff684f3102d0232
commit: afac5432e118c065119448f138fd24c3084f952d [107/150] s390/gmap: validate VMA in
__gmap_zap()
config: s390-randconfig-r044-20211114 (attached as .config)
compiler: s390-linux-gcc (GCC) 7.5.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-4.9
git checkout afac5432e118c065119448f138fd24c3084f952d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.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 error/warnings (new ones prefixed by >>):
arch/s390/mm/gmap.c: In function '__gmap_zap':
> arch/s390/mm/gmap.c:665:9: error: implicit declaration of
function 'vma_lookup'; did you mean '__d_lookup'?
[-Werror=implicit-function-declaration]
vma = vma_lookup(gmap->mm,
vmaddr);
^~~~~~~~~~
__d_lookup
> arch/s390/mm/gmap.c:665:7: warning: assignment makes pointer from
integer without a cast [-Wint-conversion]
vma = vma_lookup(gmap->mm,
vmaddr);
^
arch/s390/mm/gmap.c: In function '__gmap_unshadow_sgt':
arch/s390/mm/gmap.c:1199:16: warning: variable 'asce' set but not used
[-Wunused-but-set-variable]
unsigned long asce, *pgt;
^~~~
arch/s390/mm/gmap.c: In function '__gmap_unshadow_r3t':
arch/s390/mm/gmap.c:1257:16: warning: variable 'asce' set but not used
[-Wunused-but-set-variable]
unsigned long asce, *sgt;
^~~~
arch/s390/mm/gmap.c: In function '__gmap_unshadow_r2t':
arch/s390/mm/gmap.c:1315:16: warning: variable 'asce' set but not used
[-Wunused-but-set-variable]
unsigned long asce, *r3t;
^~~~
cc1: some warnings being treated as errors
vim +665 arch/s390/mm/gmap.c
648
649 /*
650 * this function is assumed to be called with mmap_sem held
651 */
652 void __gmap_zap(struct gmap *gmap, unsigned long gaddr)
653 {
654 struct vm_area_struct *vma;
655 unsigned long vmaddr;
656 spinlock_t *ptl;
657 pte_t *ptep;
658
659 /* Find the vm address for the guest address */
660 vmaddr = (unsigned long) radix_tree_lookup(&gmap->guest_to_host,
661 gaddr >> PMD_SHIFT);
662 if (vmaddr) {
663 vmaddr |= gaddr & ~PMD_MASK;
664
665 vma = vma_lookup(gmap->mm, vmaddr);
666 if (!vma
|| is_vm_hugetlb_page(vma))
667 return;
668
669 /* Get pointer to the page table entry */
670 ptep = get_locked_pte(gmap->mm, vmaddr, &ptl);
671 if (likely(ptep))
672 ptep_zap_unused(gmap->mm, vmaddr, ptep, 0);
673 pte_unmap_unlock(ptep, ptl);
674 }
675 }
676 EXPORT_SYMBOL_GPL(__gmap_zap);
677
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org