* [akpm-mm:mm-new 163/164] mm/bootmem_info.c:58:15: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2026-04-17 10:24 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-04-17 10:24 UTC (permalink / raw)
To: Muchun Song
Cc: oe-kbuild-all, David Hildenbrand, Andrew Morton,
Linux Memory Management List
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-17 10:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-17 10:24 [akpm-mm:mm-new 163/164] mm/bootmem_info.c:58:15: sparse: sparse: incorrect type in assignment (different address spaces) kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox