All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: mm/memory.c:3744:9: sparse: sparse: context imbalance in 'do_set_pte' - different lock contexts for basic block
Date: Wed, 09 Jun 2021 03:59:53 +0800	[thread overview]
Message-ID: <202106090342.YcLZjiQW-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
CC: Will Deacon <will@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   368094df48e680fa51cedb68537408cfa64b788e
commit: f9ce0be71d1fbb038ada15ced83474b0e63f264d mm: Cleanup faultaround and finish_fault() codepaths
date:   5 months ago
:::::: branch date: 3 hours ago
:::::: commit date: 5 months ago
config: parisc-randconfig-s032-20210607 (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=f9ce0be71d1fbb038ada15ced83474b0e63f264d
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout f9ce0be71d1fbb038ada15ced83474b0e63f264d
        # 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__' W=1 ARCH=parisc 

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:771:9: sparse: sparse: context imbalance in 'copy_nonpresent_pte' - different lock contexts for basic block
   mm/memory.c:899: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:497:26: sparse: sparse: context imbalance in 'zap_pte_range' - different lock contexts for basic block
   mm/memory.c:1623:16: sparse: sparse: context imbalance in '__get_locked_pte' - different lock contexts for basic block
   mm/memory.c:1643:9: sparse: sparse: context imbalance in 'insert_page_into_pte_locked' - different lock contexts for basic block
   mm/memory.c:1672:9: sparse: sparse: context imbalance in 'insert_page' - different lock contexts for basic block
   mm/memory.c:1963:9: sparse: sparse: context imbalance in 'insert_pfn' - different lock contexts for basic block
   mm/memory.c:2182:17: sparse: sparse: context imbalance in 'remap_pte_range' - different lock contexts for basic block
   mm/memory.c:2419:17: sparse: sparse: context imbalance in 'apply_to_pte_range' - unexpected unlock
   mm/memory.c:2911:17: sparse: sparse: context imbalance in 'wp_page_copy' - different lock contexts for basic block
   mm/memory.c:3022:17: sparse: sparse: context imbalance in 'wp_pfn_shared' - unexpected unlock
   mm/memory.c:3085:19: sparse: sparse: context imbalance in 'do_wp_page' - different lock contexts for basic block
   mm/memory.c:3577:9: sparse: sparse: context imbalance in 'do_anonymous_page' - different lock contexts for basic block
>> mm/memory.c:3744:9: sparse: sparse: context imbalance in 'do_set_pte' - different lock contexts for basic block
   mm/memory.c: note: in included file (through arch/parisc/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
   include/linux/pgtable.h:852:9: sparse: sparse: context imbalance in 'do_numa_page' - different lock contexts for basic block
   mm/memory.c:4341:9: sparse: sparse: context imbalance in 'handle_pte_fault' - different lock contexts for basic block
   mm/memory.c:4627:5: sparse: sparse: context imbalance in 'follow_pte' - different lock contexts for basic block
   mm/memory.c:4717:9: sparse: sparse: context imbalance in 'follow_pfn' - unexpected unlock

vim +/do_set_pte +3744 mm/memory.c

1010245964415b Kirill A. Shutemov 2016-07-26  3723  
f9ce0be71d1fbb Kirill A. Shutemov 2020-12-19  3724  void do_set_pte(struct vm_fault *vmf, struct page *page)
3bb977946998ae Kirill A. Shutemov 2014-04-03  3725  {
82b0f8c39a3869 Jan Kara           2016-12-14  3726  	struct vm_area_struct *vma = vmf->vma;
82b0f8c39a3869 Jan Kara           2016-12-14  3727  	bool write = vmf->flags & FAULT_FLAG_WRITE;
3bb977946998ae Kirill A. Shutemov 2014-04-03  3728  	pte_t entry;
7267ec008b5cd8 Kirill A. Shutemov 2016-07-26  3729  
3bb977946998ae Kirill A. Shutemov 2014-04-03  3730  	flush_icache_page(vma, page);
3bb977946998ae Kirill A. Shutemov 2014-04-03  3731  	entry = mk_pte(page, vma->vm_page_prot);
44bf431b47b429 Bibo Mao           2020-05-27  3732  	entry = pte_sw_mkyoung(entry);
3bb977946998ae Kirill A. Shutemov 2014-04-03  3733  	if (write)
3bb977946998ae Kirill A. Shutemov 2014-04-03  3734  		entry = maybe_mkwrite(pte_mkdirty(entry), vma);
bae473a423f65e Kirill A. Shutemov 2016-07-26  3735  	/* copy-on-write page */
bae473a423f65e Kirill A. Shutemov 2016-07-26  3736  	if (write && !(vma->vm_flags & VM_SHARED)) {
3bb977946998ae Kirill A. Shutemov 2014-04-03  3737  		inc_mm_counter_fast(vma->vm_mm, MM_ANONPAGES);
82b0f8c39a3869 Jan Kara           2016-12-14  3738  		page_add_new_anon_rmap(page, vma, vmf->address, false);
b518154e59aab3 Joonsoo Kim        2020-08-11  3739  		lru_cache_add_inactive_or_unevictable(page, vma);
3bb977946998ae Kirill A. Shutemov 2014-04-03  3740  	} else {
eca56ff906bdd0 Jerome Marchand    2016-01-14  3741  		inc_mm_counter_fast(vma->vm_mm, mm_counter_file(page));
dd78fedde4b99b Kirill A. Shutemov 2016-07-26  3742  		page_add_file_rmap(page, false);
3bb977946998ae Kirill A. Shutemov 2014-04-03  3743  	}
82b0f8c39a3869 Jan Kara           2016-12-14 @3744  	set_pte_at(vma->vm_mm, vmf->address, vmf->pte, entry);
953c66c2b22a30 Aneesh Kumar K.V   2016-12-12  3745  }
3bb977946998ae Kirill A. Shutemov 2014-04-03  3746  

:::::: The code at line 3744 was first introduced by commit
:::::: 82b0f8c39a3869b6fd2a10e180a862248736ec6f mm: join struct fault_env and vm_fault

:::::: TO: Jan Kara <jack@suse.cz>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
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: 37036 bytes --]

             reply	other threads:[~2021-06-08 19:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08 19:59 kernel test robot [this message]
2021-08-30 23:56 mm/memory.c:3744:9: sparse: sparse: context imbalance in 'do_set_pte' - different lock contexts for basic block kernel test robot
2021-09-01  7:00 kernel test robot

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=202106090342.YcLZjiQW-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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 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.