All of lore.kernel.org
 help / color / mirror / Atom feed
* mm/memory.c:725:21: sparse: sparse: context imbalance in 'restore_exclusive_pte' - different lock contexts for basic block
@ 2021-07-10  4:16 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-07-10  4:16 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 8859 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Alistair Popple <apopple@nvidia.com>
CC: Dan Carpenter <error27@gmail.com>
CC: Christoph Hellwig <hch@lst.de>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   50be9417e23af5a8ac860d998e1e3f06b8fd79d7
commit: b756a3b5e7ead8f6f4b03cea8ac22478ce04c8a8 mm: device exclusive memory access
date:   8 days ago
:::::: branch date: 9 hours ago
:::::: commit date: 8 days ago
config: parisc-randconfig-s032-20210709 (attached as .config)
compiler: hppa64-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.3-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b756a3b5e7ead8f6f4b03cea8ac22478ce04c8a8
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout b756a3b5e7ead8f6f4b03cea8ac22478ce04c8a8
        # 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__' O=build_dir ARCH=parisc SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
   mm/memory.c: note: in included file (through include/linux/export.h, include/linux/linkage.h, include/linux/kernel.h, ...):
   ./include/generated/autoksyms.h:5:16: sparse: sparse: no whitespace before object-like macro body
   ./include/generated/autoksyms.h:6:16: sparse: sparse: no whitespace before object-like macro body
   ./include/generated/autoksyms.h:6:9: sparse: sparse: preprocessor token __KSYM_ redefined
   ./include/generated/autoksyms.h:5:9: sparse: this was the original definition
   ./include/generated/autoksyms.h:7:16: sparse: sparse: no whitespace before object-like macro body
   ./include/generated/autoksyms.h:7:9: sparse: sparse: preprocessor token __KSYM_ redefined
   ./include/generated/autoksyms.h:5:9: sparse: this was the original definition
   ./include/generated/autoksyms.h:8:16: sparse: sparse: no whitespace before object-like macro body
   ./include/generated/autoksyms.h:8:9: sparse: sparse: preprocessor token __KSYM_ redefined
   ./include/generated/autoksyms.h:5:9: sparse: this was the original definition
   ./include/generated/autoksyms.h:9:16: sparse: sparse: no whitespace before object-like macro body
   ./include/generated/autoksyms.h:9:9: sparse: sparse: preprocessor token __KSYM_ redefined
   ./include/generated/autoksyms.h:5:9: sparse: this was the original definition
   mm/memory.c:5405:22: sparse: sparse: cast removes address space '__user' of expression
>> mm/memory.c:725:21: sparse: sparse: context imbalance in 'restore_exclusive_pte' - different lock contexts for basic block
   mm/memory.c:771:1: sparse: sparse: context imbalance in 'copy_nonpresent_pte' - different lock contexts for basic block
   mm/memory.c:980:9: sparse: sparse: context imbalance in 'copy_pte_range' - different lock contexts for basic block
   mm/memory.c: note: in included file (through include/linux/pgtable.h, arch/parisc/include/asm/io.h, include/linux/io.h, ...):
   arch/parisc/include/asm/pgtable.h:449:9: sparse: sparse: context imbalance in 'zap_pte_range' - different lock contexts for basic block
   mm/memory.c:1736:16: sparse: sparse: context imbalance in '__get_locked_pte' - different lock contexts for basic block
   mm/memory.c:1757:9: sparse: sparse: context imbalance in 'insert_page_into_pte_locked' - different lock contexts for basic block
   mm/memory.c:1785:9: sparse: sparse: context imbalance in 'insert_page' - different lock contexts for basic block
   mm/memory.c:2077:9: sparse: sparse: context imbalance in 'insert_pfn' - different lock contexts for basic block
   mm/memory.c:2296:17: sparse: sparse: context imbalance in 'remap_pte_range' - different lock contexts for basic block
   mm/memory.c:2543:17: sparse: sparse: context imbalance in 'apply_to_pte_range' - unexpected unlock
   mm/memory.c:3068:17: sparse: sparse: context imbalance in 'wp_page_copy' - different lock contexts for basic block
   mm/memory.c:3180:17: sparse: sparse: context imbalance in 'wp_pfn_shared' - unexpected unlock
   mm/memory.c:3243:19: sparse: sparse: context imbalance in 'do_wp_page' - different lock contexts for basic block
   mm/memory.c:3812:9: sparse: sparse: context imbalance in 'do_anonymous_page' - different lock contexts for basic block
   mm/memory.c:3982:9: sparse: sparse: context imbalance in 'do_set_pte' - different lock contexts for basic block
   mm/memory.c:4411:32: sparse: sparse: context imbalance in 'do_numa_page' - different lock contexts for basic block
   mm/memory.c:4588:9: sparse: sparse: context imbalance in 'handle_pte_fault' - different lock contexts for basic block
   mm/memory.c:4874:5: sparse: sparse: context imbalance in 'follow_invalidate_pte' - different lock contexts for basic block
   mm/memory.c:4995:9: sparse: sparse: context imbalance in 'follow_pfn' - unexpected unlock

vim +/restore_exclusive_pte +725 mm/memory.c

28093f9f34cede Gerald Schaefer 2016-04-28  701  
b756a3b5e7ead8 Alistair Popple 2021-06-30  702  static void restore_exclusive_pte(struct vm_area_struct *vma,
b756a3b5e7ead8 Alistair Popple 2021-06-30  703  				  struct page *page, unsigned long address,
b756a3b5e7ead8 Alistair Popple 2021-06-30  704  				  pte_t *ptep)
b756a3b5e7ead8 Alistair Popple 2021-06-30  705  {
b756a3b5e7ead8 Alistair Popple 2021-06-30  706  	pte_t pte;
b756a3b5e7ead8 Alistair Popple 2021-06-30  707  	swp_entry_t entry;
b756a3b5e7ead8 Alistair Popple 2021-06-30  708  
b756a3b5e7ead8 Alistair Popple 2021-06-30  709  	pte = pte_mkold(mk_pte(page, READ_ONCE(vma->vm_page_prot)));
b756a3b5e7ead8 Alistair Popple 2021-06-30  710  	if (pte_swp_soft_dirty(*ptep))
b756a3b5e7ead8 Alistair Popple 2021-06-30  711  		pte = pte_mksoft_dirty(pte);
b756a3b5e7ead8 Alistair Popple 2021-06-30  712  
b756a3b5e7ead8 Alistair Popple 2021-06-30  713  	entry = pte_to_swp_entry(*ptep);
b756a3b5e7ead8 Alistair Popple 2021-06-30  714  	if (pte_swp_uffd_wp(*ptep))
b756a3b5e7ead8 Alistair Popple 2021-06-30  715  		pte = pte_mkuffd_wp(pte);
b756a3b5e7ead8 Alistair Popple 2021-06-30  716  	else if (is_writable_device_exclusive_entry(entry))
b756a3b5e7ead8 Alistair Popple 2021-06-30  717  		pte = maybe_mkwrite(pte_mkdirty(pte), vma);
b756a3b5e7ead8 Alistair Popple 2021-06-30  718  
b756a3b5e7ead8 Alistair Popple 2021-06-30  719  	set_pte_at(vma->vm_mm, address, ptep, pte);
b756a3b5e7ead8 Alistair Popple 2021-06-30  720  
b756a3b5e7ead8 Alistair Popple 2021-06-30  721  	/*
b756a3b5e7ead8 Alistair Popple 2021-06-30  722  	 * No need to take a page reference as one was already
b756a3b5e7ead8 Alistair Popple 2021-06-30  723  	 * created when the swap entry was made.
b756a3b5e7ead8 Alistair Popple 2021-06-30  724  	 */
b756a3b5e7ead8 Alistair Popple 2021-06-30 @725  	if (PageAnon(page))
b756a3b5e7ead8 Alistair Popple 2021-06-30  726  		page_add_anon_rmap(page, vma, address, false);
b756a3b5e7ead8 Alistair Popple 2021-06-30  727  	else
b756a3b5e7ead8 Alistair Popple 2021-06-30  728  		/*
b756a3b5e7ead8 Alistair Popple 2021-06-30  729  		 * Currently device exclusive access only supports anonymous
b756a3b5e7ead8 Alistair Popple 2021-06-30  730  		 * memory so the entry shouldn't point to a filebacked page.
b756a3b5e7ead8 Alistair Popple 2021-06-30  731  		 */
b756a3b5e7ead8 Alistair Popple 2021-06-30  732  		WARN_ON_ONCE(!PageAnon(page));
b756a3b5e7ead8 Alistair Popple 2021-06-30  733  
b756a3b5e7ead8 Alistair Popple 2021-06-30  734  	if (vma->vm_flags & VM_LOCKED)
b756a3b5e7ead8 Alistair Popple 2021-06-30  735  		mlock_vma_page(page);
b756a3b5e7ead8 Alistair Popple 2021-06-30  736  
b756a3b5e7ead8 Alistair Popple 2021-06-30  737  	/*
b756a3b5e7ead8 Alistair Popple 2021-06-30  738  	 * No need to invalidate - it was non-present before. However
b756a3b5e7ead8 Alistair Popple 2021-06-30  739  	 * secondary CPUs may have mappings that need invalidating.
b756a3b5e7ead8 Alistair Popple 2021-06-30  740  	 */
b756a3b5e7ead8 Alistair Popple 2021-06-30  741  	update_mmu_cache(vma, address, ptep);
b756a3b5e7ead8 Alistair Popple 2021-06-30  742  }
b756a3b5e7ead8 Alistair Popple 2021-06-30  743  

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 23757 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-10  4:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-10  4:16 mm/memory.c:725:21: sparse: sparse: context imbalance in 'restore_exclusive_pte' - different lock contexts for basic block kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.