From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BDEAC433EF for ; Wed, 9 Mar 2022 05:07:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9FBA38D000A; Wed, 9 Mar 2022 00:07:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9AA448D0001; Wed, 9 Mar 2022 00:07:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 899A48D000A; Wed, 9 Mar 2022 00:07:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0227.hostedemail.com [216.40.44.227]) by kanga.kvack.org (Postfix) with ESMTP id 79D868D0001 for ; Wed, 9 Mar 2022 00:07:57 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 16C798249980 for ; Wed, 9 Mar 2022 05:07:57 +0000 (UTC) X-FDA: 79223665794.23.A4A5F8A Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by imf19.hostedemail.com (Postfix) with ESMTP id 1EC831A000B for ; Wed, 9 Mar 2022 05:07:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646802476; x=1678338476; h=date:from:to:cc:subject:message-id:mime-version; bh=jD8qpVUFnShFh8snyKRJ/SUwDifn2tQekvrmipzgOJI=; b=UKugNzoMd1/N3whby38W0M9CD2UMuOk5usMNPFHl9eq5fn67GkwEodNu F+6InfOdtlpemNVII+QdB/V9vNIU2kiFsuH7zbyiQA3WQ/JFyEPFVMXpu NaAHaioff7mPiJVDkpsRADrTsuA3snfXEIz5E/lcIVNR7eDZO1L/AWAHK ZdK2CgfdLyD9YDpQWTtOrXQyLg+aQhZpqMlM3Gk6uIC0QhjcRhaD1TQuJ ijfYoSmusRyRyKfDQ5KYoTA9en+tlkqYR1hadphWYRmLbjgrHltT+TRJA sAHWf8WjAoDtx1G0t0hx5DbWqa7/4L+ZfKop18BdcV4mzrAFw7Z77H8Ao Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10280"; a="235496597" X-IronPort-AV: E=Sophos;i="5.90,166,1643702400"; d="scan'208";a="235496597" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2022 21:07:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,166,1643702400"; d="scan'208";a="711805326" Received: from lkp-server02.sh.intel.com (HELO 89b41b6ae01c) ([10.239.97.151]) by orsmga005.jf.intel.com with ESMTP; 08 Mar 2022 21:07:52 -0800 Received: from kbuild by 89b41b6ae01c with local (Exim 4.92) (envelope-from ) id 1nRoYB-0002ct-Es; Wed, 09 Mar 2022 05:07:51 +0000 Date: Wed, 9 Mar 2022 13:07:34 +0800 From: kernel test robot To: Alistair Popple Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Dan Carpenter , Christoph Hellwig , Andrew Morton , Linux Memory Management List Subject: mm/memory.c:709:25: sparse: sparse: cast to non-scalar Message-ID: <202203091301.CQlNi3CF-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 1EC831A000B X-Stat-Signature: 9o4qq4o4h7zs8hgoq7j8rcxciu976omy Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=UKugNzoM; spf=none (imf19.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.151) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1646802475-823323 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 330f4c53d3c2d8b11d86ec03a964b86dc81452f5 commit: b756a3b5e7ead8f6f4b03cea8ac22478ce04c8a8 mm: device exclusive memory access date: 8 months ago config: alpha-randconfig-s031-20220308 (https://download.01.org/0day-ci/archive/20220309/202203091301.CQlNi3CF-lkp@intel.com/config) compiler: alpha-linux-gcc (GCC) 11.2.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.4-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 config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=alpha SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> mm/memory.c:709:25: sparse: sparse: cast to non-scalar >> mm/memory.c:709:25: sparse: sparse: cast from non-scalar mm/memory.c:1023:17: sparse: sparse: context imbalance in 'copy_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:1785:9: sparse: sparse: context imbalance in 'insert_page' - different lock contexts for basic block mm/memory.c:2287: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:2831:17: sparse: sparse: context imbalance in 'wp_page_copy' - unexpected unlock 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: 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:275:16: sparse: sparse: cast to non-scalar include/linux/pgtable.h:275:16: sparse: sparse: cast from non-scalar 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 +709 mm/memory.c 701 702 static void restore_exclusive_pte(struct vm_area_struct *vma, 703 struct page *page, unsigned long address, 704 pte_t *ptep) 705 { 706 pte_t pte; 707 swp_entry_t entry; 708 > 709 pte = pte_mkold(mk_pte(page, READ_ONCE(vma->vm_page_prot))); 710 if (pte_swp_soft_dirty(*ptep)) 711 pte = pte_mksoft_dirty(pte); 712 713 entry = pte_to_swp_entry(*ptep); 714 if (pte_swp_uffd_wp(*ptep)) 715 pte = pte_mkuffd_wp(pte); 716 else if (is_writable_device_exclusive_entry(entry)) 717 pte = maybe_mkwrite(pte_mkdirty(pte), vma); 718 719 set_pte_at(vma->vm_mm, address, ptep, pte); 720 721 /* 722 * No need to take a page reference as one was already 723 * created when the swap entry was made. 724 */ 725 if (PageAnon(page)) 726 page_add_anon_rmap(page, vma, address, false); 727 else 728 /* 729 * Currently device exclusive access only supports anonymous 730 * memory so the entry shouldn't point to a filebacked page. 731 */ 732 WARN_ON_ONCE(!PageAnon(page)); 733 734 if (vma->vm_flags & VM_LOCKED) 735 mlock_vma_page(page); 736 737 /* 738 * No need to invalidate - it was non-present before. However 739 * secondary CPUs may have mappings that need invalidating. 740 */ 741 update_mmu_cache(vma, address, ptep); 742 } 743 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org