From: kernel test robot <lkp@intel.com>
To: Muchun Song <songmuchun@bytedance.com>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Oscar Salvador <osalvador@suse.de>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [linux-next:master 3616/3917] mm/sparse-vmemmap.c:69:35: warning: operation on 'pte' may be undefined
Date: Fri, 12 Mar 2021 08:44:00 +0800 [thread overview]
Message-ID: <202103120858.Lrrk2V3o-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3992 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 98546348153dee5f8ced572fd6c4690461d20f51
commit: 342ec54e2df2b6944c883e078cfae855cc33cc31 [3616/3917] mm: hugetlb: free the vmemmap pages associated with each HugeTLB page
config: arm64-randconfig-r001-20210311 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=342ec54e2df2b6944c883e078cfae855cc33cc31
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 342ec54e2df2b6944c883e078cfae855cc33cc31
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/arm64/include/asm/memory.h:366,
from arch/arm64/include/asm/thread_info.h:17,
from include/linux/thread_info.h:58,
from arch/arm64/include/asm/preempt.h:5,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from mm/sparse-vmemmap.c:21:
mm/sparse-vmemmap.c: In function 'vmemmap_pte_range':
>> mm/sparse-vmemmap.c:69:35: warning: operation on 'pte' may be undefined [-Wsequence-point]
69 | walk->reuse_page = pte_page(*pte++);
| ~~~^~
include/asm-generic/memory_model.h:54:40: note: in definition of macro '__pfn_to_page'
54 | #define __pfn_to_page(pfn) (vmemmap + (pfn))
| ^~~
arch/arm64/include/asm/pgtable.h:73:4: note: in expansion of macro 'pte_val'
73 | ((pte_val(pte) & PTE_ADDR_LOW) | ((pte_val(pte) & PTE_ADDR_HIGH) << 36))
| ^~~~~~~
arch/arm64/include/asm/pgtable.h:80:24: note: in expansion of macro '__pte_to_phys'
80 | #define pte_pfn(pte) (__pte_to_phys(pte) >> PAGE_SHIFT)
| ^~~~~~~~~~~~~
arch/arm64/include/asm/pgtable.h:86:37: note: in expansion of macro 'pte_pfn'
86 | #define pte_page(pte) (pfn_to_page(pte_pfn(pte)))
| ^~~~~~~
mm/sparse-vmemmap.c:69:22: note: in expansion of macro 'pte_page'
69 | walk->reuse_page = pte_page(*pte++);
| ^~~~~~~~
vim +/pte +69 mm/sparse-vmemmap.c
52
53 static void vmemmap_pte_range(pmd_t *pmd, unsigned long addr,
54 unsigned long end,
55 struct vmemmap_remap_walk *walk)
56 {
57 pte_t *pte;
58
59 pte = pte_offset_kernel(pmd, addr);
60
61 /*
62 * The reuse_page is found 'first' in table walk before we start
63 * remapping (which is calling @walk->remap_pte).
64 */
65 if (!walk->reuse_page) {
66 BUG_ON(pte_none(*pte));
67 BUG_ON(walk->reuse_addr != addr);
68
> 69 walk->reuse_page = pte_page(*pte++);
70 /*
71 * Because the reuse address is part of the range that we are
72 * walking, skip the reuse address range.
73 */
74 addr += PAGE_SIZE;
75 }
76
77 for (; addr != end; addr += PAGE_SIZE, pte++) {
78 BUG_ON(pte_none(*pte));
79
80 walk->remap_pte(pte, addr, walk);
81 }
82 }
83
---
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: 39219 bytes --]
reply other threads:[~2021-03-12 0:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202103120858.Lrrk2V3o-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=osalvador@suse.de \
--cc=songmuchun@bytedance.com \
/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