include/linux/mm.h:1734:21: sparse: sparse: context imbalance in 'gmap_make_secure' - different lock contexts for basic block

From: kernel test robot
Date: Sat Aug 08 2020 - 21:58:13 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 06a81c1c7db9bd5de0bd38cd5acc44bb22b99150
commit: 214d9bbcd3a67230b932f6cea83c078ab34d9e70 s390/mm: provide memory management functions for protected KVM guests
date: 5 months ago
config: s390-randconfig-s032-20200809 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-118-ge1578773-dirty
git checkout 214d9bbcd3a67230b932f6cea83c078ab34d9e70
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=s390

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)

arch/s390/kernel/uv.c: note: in included file (through include/linux/memblock.h):
>> include/linux/mm.h:1734:21: sparse: sparse: context imbalance in 'gmap_make_secure' - different lock contexts for basic block

vim +/gmap_make_secure +1734 include/linux/mm.h

d08b3851da41d0e Peter Zijlstra 2006-09-25 1731
25ca1d6c02fe1c6 Namhyung Kim 2010-10-26 1732 extern pte_t *__get_locked_pte(struct mm_struct *mm, unsigned long addr,
25ca1d6c02fe1c6 Namhyung Kim 2010-10-26 1733 spinlock_t **ptl);
25ca1d6c02fe1c6 Namhyung Kim 2010-10-26 @1734 static inline pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr,
25ca1d6c02fe1c6 Namhyung Kim 2010-10-26 1735 spinlock_t **ptl)
25ca1d6c02fe1c6 Namhyung Kim 2010-10-26 1736 {
25ca1d6c02fe1c6 Namhyung Kim 2010-10-26 1737 pte_t *ptep;
25ca1d6c02fe1c6 Namhyung Kim 2010-10-26 1738 __cond_lock(*ptl, ptep = __get_locked_pte(mm, addr, ptl));
25ca1d6c02fe1c6 Namhyung Kim 2010-10-26 1739 return ptep;
25ca1d6c02fe1c6 Namhyung Kim 2010-10-26 1740 }
c9cfcddfd657354 Linus Torvalds 2005-11-29 1741

:::::: The code at line 1734 was first introduced by commit
:::::: 25ca1d6c02fe1c6d90d918867ef670d323725458 mm: wrap get_locked_pte() using __cond_lock()

:::::: TO: Namhyung Kim <namhyung@xxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip