From: kernel test robot <lkp@intel.com>
To: Alistair Popple <apopple@nvidia.com>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Christoph Hellwig <hch@lst.de>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [linux-next:master 5116/5396] mm/memory.c:710:25: sparse: sparse: cast to non-scalar
Date: Wed, 26 May 2021 21:56:13 +0800 [thread overview]
Message-ID: <202105262107.LkxpsZsV-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4315 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: f6b46ef27317b3441138b902689bd89e4f82c6f4
commit: ce50e82c1d69532fc05721ed7951480c8525e7fd [5116/5396] mm: device exclusive memory access
config: alpha-randconfig-s032-20210526 (attached as .config)
compiler: alpha-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/next/linux-next.git/commit/?id=ce50e82c1d69532fc05721ed7951480c8525e7fd
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout ce50e82c1d69532fc05721ed7951480c8525e7fd
# 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=alpha
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:710:25: sparse: sparse: cast to non-scalar
>> mm/memory.c:710:25: sparse: sparse: cast from non-scalar
mm/memory.c:1024:17: sparse: sparse: context imbalance in 'copy_pte_range' - different lock contexts for basic block
mm/memory.c:1721:16: sparse: sparse: context imbalance in '__get_locked_pte' - different lock contexts for basic block
mm/memory.c:1770:9: sparse: sparse: context imbalance in 'insert_page' - different lock contexts for basic block
mm/memory.c:2272:17: sparse: sparse: context imbalance in 'remap_pte_range' - different lock contexts for basic block
mm/memory.c:2528:17: sparse: sparse: context imbalance in 'apply_to_pte_range' - unexpected unlock
mm/memory.c:2816:17: sparse: sparse: context imbalance in 'wp_page_copy' - unexpected unlock
mm/memory.c:3162:17: sparse: sparse: context imbalance in 'wp_pfn_shared' - unexpected unlock
mm/memory.c:3225:19: sparse: sparse: context imbalance in 'do_wp_page' - different lock contexts for basic block
mm/memory.c: note: in included file (through include/linux/mm.h, arch/alpha/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
include/linux/pgtable.h:257:16: sparse: sparse: cast to non-scalar
include/linux/pgtable.h:257:16: sparse: sparse: cast from non-scalar
mm/memory.c:4823:5: sparse: sparse: context imbalance in 'follow_invalidate_pte' - different lock contexts for basic block
mm/memory.c:4944:9: sparse: sparse: context imbalance in 'follow_pfn' - unexpected unlock
vim +710 mm/memory.c
702
703 static void restore_exclusive_pte(struct vm_area_struct *vma,
704 struct page *page, unsigned long address,
705 pte_t *ptep)
706 {
707 pte_t pte;
708 swp_entry_t entry;
709
> 710 pte = pte_mkold(mk_pte(page, READ_ONCE(vma->vm_page_prot)));
711 if (pte_swp_soft_dirty(*ptep))
712 pte = pte_mksoft_dirty(pte);
713
714 entry = pte_to_swp_entry(*ptep);
715 if (pte_swp_uffd_wp(*ptep))
716 pte = pte_mkuffd_wp(pte);
717 else if (is_writable_device_exclusive_entry(entry))
718 pte = maybe_mkwrite(pte_mkdirty(pte), vma);
719
720 set_pte_at(vma->vm_mm, address, ptep, pte);
721
722 /*
723 * No need to take a page reference as one was already
724 * created when the swap entry was made.
725 */
726 if (PageAnon(page))
727 page_add_anon_rmap(page, vma, address, false);
728 else
729 /*
730 * Currently device exclusive access only supports anonymous
731 * memory so the entry shouldn't point to a filebacked page.
732 */
733 WARN_ON_ONCE(!PageAnon(page));
734
735 if (vma->vm_flags & VM_LOCKED)
736 mlock_vma_page(page);
737
738 /*
739 * No need to invalidate - it was non-present before. However
740 * secondary CPUs may have mappings that need invalidating.
741 */
742 update_mmu_cache(vma, address, ptep);
743 }
744
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26003 bytes --]
next reply other threads:[~2021-05-26 13:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 13:56 kernel test robot [this message]
2021-06-16 6:41 ` [linux-next:master 5116/5396] mm/memory.c:710:25: sparse: sparse: cast to non-scalar Alistair Popple
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=202105262107.LkxpsZsV-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=hch@lst.de \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).