From: kernel test robot <lkp@intel.com>
To: Muchun Song <songmuchun@bytedance.com>
Cc: oe-kbuild-all@lists.linux.dev,
David Hildenbrand <david@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [akpm-mm:mm-new 163/164] mm/bootmem_info.c:58:15: sparse: sparse: incorrect type in assignment (different address spaces)
Date: Fri, 17 Apr 2026 18:24:44 +0800 [thread overview]
Message-ID: <202604171841.MGvqbmu8-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
head: ee03ca7d1cb1223d0e14dfd3b48478545af75253
commit: 8568f268a5183e0fd5fbd33569b6513038b62f27 [163/164] mm/sparse: fix race on mem_section->usage in pfn walkers
config: x86_64-randconfig-r131-20260417 (https://download.01.org/0day-ci/archive/20260417/202604171841.MGvqbmu8-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260417/202604171841.MGvqbmu8-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604171841.MGvqbmu8-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> mm/bootmem_info.c:58:15: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct mem_section_usage *usage @@ got struct mem_section_usage [noderef] __rcu *usage @@
mm/bootmem_info.c:58:15: sparse: expected struct mem_section_usage *usage
mm/bootmem_info.c:58:15: sparse: got struct mem_section_usage [noderef] __rcu *usage
vim +58 mm/bootmem_info.c
426e5c429d16e4c Muchun Song 2021-06-30 42
cdcfc631c80e716 Muchun Song 2021-09-02 43 static void __init register_page_bootmem_info_section(unsigned long start_pfn)
426e5c429d16e4c Muchun Song 2021-06-30 44 {
426e5c429d16e4c Muchun Song 2021-06-30 45 unsigned long mapsize, section_nr, i;
426e5c429d16e4c Muchun Song 2021-06-30 46 struct mem_section *ms;
426e5c429d16e4c Muchun Song 2021-06-30 47 struct mem_section_usage *usage;
7f8e592bb3271ea David Hildenbrand (Arm 2026-03-20 48) struct page *page;
426e5c429d16e4c Muchun Song 2021-06-30 49
7f8e592bb3271ea David Hildenbrand (Arm 2026-03-20 50) start_pfn = SECTION_ALIGN_DOWN(start_pfn);
426e5c429d16e4c Muchun Song 2021-06-30 51 section_nr = pfn_to_section_nr(start_pfn);
426e5c429d16e4c Muchun Song 2021-06-30 52 ms = __nr_to_section(section_nr);
426e5c429d16e4c Muchun Song 2021-06-30 53
d65917c42373f70 Frank van der Linden 2025-02-28 54 if (!preinited_vmemmap_section(ms))
7f8e592bb3271ea David Hildenbrand (Arm 2026-03-20 55) register_page_bootmem_memmap(section_nr, pfn_to_page(start_pfn),
d65917c42373f70 Frank van der Linden 2025-02-28 56 PAGES_PER_SECTION);
426e5c429d16e4c Muchun Song 2021-06-30 57
426e5c429d16e4c Muchun Song 2021-06-30 @58 usage = ms->usage;
426e5c429d16e4c Muchun Song 2021-06-30 59 page = virt_to_page(usage);
426e5c429d16e4c Muchun Song 2021-06-30 60
426e5c429d16e4c Muchun Song 2021-06-30 61 mapsize = PAGE_ALIGN(mem_section_usage_size()) >> PAGE_SHIFT;
426e5c429d16e4c Muchun Song 2021-06-30 62
426e5c429d16e4c Muchun Song 2021-06-30 63 for (i = 0; i < mapsize; i++, page++)
426e5c429d16e4c Muchun Song 2021-06-30 64 get_page_bootmem(section_nr, page, MIX_SECTION_INFO);
426e5c429d16e4c Muchun Song 2021-06-30 65 }
426e5c429d16e4c Muchun Song 2021-06-30 66
:::::: The code at line 58 was first introduced by commit
:::::: 426e5c429d16e4cd5ded46e21ff8e939bf8abd0f mm: memory_hotplug: factor out bootmem core functions to bootmem_info.c
:::::: TO: Muchun Song <songmuchun@bytedance.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-04-17 10:25 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=202604171841.MGvqbmu8-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--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