From: kernel test robot <lkp@intel.com>
To: Mingyu Wang <25181214217@stu.xidian.edu.cn>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH] mm/hugetlb: fix resv_map memory leak in __mmap_region error path
Date: Sat, 2 May 2026 06:03:46 +0800 [thread overview]
Message-ID: <202605020650.VNBzVdYb-lkp@intel.com> (raw)
In-Reply-To: <20260425070700.562229-1-25181214217@stu.xidian.edu.cn>
Hi Mingyu,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
url: https://github.com/intel-lab-lkp/linux/commits/Mingyu-Wang/mm-hugetlb-fix-resv_map-memory-leak-in-__mmap_region-error-path/20260425-203812
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20260425070700.562229-1-25181214217%40stu.xidian.edu.cn
patch subject: [RFC PATCH] mm/hugetlb: fix resv_map memory leak in __mmap_region error path
config: arm-allnoconfig (https://download.01.org/0day-ci/archive/20260502/202605020650.VNBzVdYb-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260502/202605020650.VNBzVdYb-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/202605020650.VNBzVdYb-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from arch/arm/kernel/asm-offsets.c:14:
In file included from include/linux/mm.h:8:
In file included from include/linux/gfp.h:7:
In file included from include/linux/mmzone.h:22:
>> include/linux/mm_types.h:865:28: warning: declaration of 'struct vm_area_desc' will not be visible outside of this function [-Wvisibility]
865 | void (*abort_hook)(struct vm_area_desc *desc);
| ^
1 warning generated.
--
In file included from kernel/fork.c:16:
In file included from include/linux/slab.h:17:
In file included from include/linux/gfp.h:7:
In file included from include/linux/mmzone.h:22:
>> include/linux/mm_types.h:865:28: warning: declaration of 'struct vm_area_desc' will not be visible outside of this function [-Wvisibility]
865 | void (*abort_hook)(struct vm_area_desc *desc);
| ^
In file included from kernel/fork.c:34:
In file included from include/linux/mempolicy.h:16:
include/linux/pagemap.h:521:45: error: use of undeclared identifier 'PMD_SHIFT'
521 | return mapping_max_folio_order(mapping) >= PMD_ORDER;
| ^~~~~~~~~
include/linux/pgtable.h:8:20: note: expanded from macro 'PMD_ORDER'
8 | #define PMD_ORDER (PMD_SHIFT - PAGE_SHIFT)
| ^~~~~~~~~
In file included from kernel/fork.c:42:
include/linux/mman.h:157:9: warning: division by zero is undefined [-Wdivision-by-zero]
157 | _calc_vm_trans(flags, MAP_SYNC, VM_SYNC ) |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mman.h:135:21: note: expanded from macro '_calc_vm_trans'
135 | : ((x) & (bit1)) / ((bit1) / (bit2))))
| ^ ~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
--
In file included from kernel/cpu.c:5:
In file included from include/linux/sched/mm.h:8:
>> include/linux/mm_types.h:865:28: warning: declaration of 'struct vm_area_desc' will not be visible outside of this function [-Wvisibility]
865 | void (*abort_hook)(struct vm_area_desc *desc);
| ^
In file included from kernel/cpu.c:26:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:13:
include/linux/pagemap.h:521:45: error: use of undeclared identifier 'PMD_SHIFT'
521 | return mapping_max_folio_order(mapping) >= PMD_ORDER;
| ^~~~~~~~~
include/linux/pgtable.h:8:20: note: expanded from macro 'PMD_ORDER'
8 | #define PMD_ORDER (PMD_SHIFT - PAGE_SHIFT)
| ^~~~~~~~~
1 warning and 1 error generated.
--
In file included from kernel/sched/core.c:12:
In file included from include/linux/highmem.h:5:
In file included from include/linux/fs.h:5:
In file included from include/linux/fs/super.h:5:
In file included from include/linux/fs/super_types.h:7:
In file included from include/linux/list_lru.h:14:
In file included from include/linux/xarray.h:16:
In file included from include/linux/gfp.h:7:
In file included from include/linux/mmzone.h:22:
>> include/linux/mm_types.h:865:28: warning: declaration of 'struct vm_area_desc' will not be visible outside of this function [-Wvisibility]
865 | void (*abort_hook)(struct vm_area_desc *desc);
| ^
In file included from kernel/sched/core.c:83:
In file included from arch/arm/include/asm/tlb.h:21:
include/linux/pagemap.h:521:45: error: use of undeclared identifier 'PMD_SHIFT'
521 | return mapping_max_folio_order(mapping) >= PMD_ORDER;
| ^~~~~~~~~
include/linux/pgtable.h:8:20: note: expanded from macro 'PMD_ORDER'
8 | #define PMD_ORDER (PMD_SHIFT - PAGE_SHIFT)
| ^~~~~~~~~
kernel/sched/core.c:8053:12: warning: array index -1 is before the beginning of the array [-Warray-bounds]
8053 | preempt_modes[preempt_dynamic_mode] : "undef",
| ^ ~~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c:8028:1: note: array 'preempt_modes' declared here
8028 | const char *preempt_modes[] = {
| ^
2 warnings and 1 error generated.
--
In file included from kernel/time/timekeeping.c:6:
In file included from include/linux/audit.h:13:
In file included from include/linux/ptrace.h:7:
In file included from include/linux/sched/signal.h:9:
In file included from include/linux/sched/task.h:13:
In file included from include/linux/uaccess.h:13:
In file included from arch/arm/include/asm/uaccess.h:17:
In file included from arch/arm/include/asm/pgtable.h:16:
In file included from arch/arm/include/asm/pgtable-nommu.h:13:
In file included from include/linux/slab.h:17:
In file included from include/linux/gfp.h:7:
In file included from include/linux/mmzone.h:22:
>> include/linux/mm_types.h:865:28: warning: declaration of 'struct vm_area_desc' will not be visible outside of this function [-Wvisibility]
865 | void (*abort_hook)(struct vm_area_desc *desc);
| ^
kernel/time/timekeeping.c:1948:13: warning: variable 'suspend_timing_needed' set but not used [-Wunused-but-set-global]
1948 | static bool suspend_timing_needed;
| ^
2 warnings generated.
--
In file included from kernel/time/alarmtimer.c:18:
In file included from include/linux/rtc.h:17:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/arm/include/asm/hardirq.h:10:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:19:
In file included from include/linux/topology.h:34:
In file included from include/linux/mmzone.h:22:
>> include/linux/mm_types.h:865:28: warning: declaration of 'struct vm_area_desc' will not be visible outside of this function [-Wvisibility]
865 | void (*abort_hook)(struct vm_area_desc *desc);
| ^
kernel/time/alarmtimer.c:54:29: warning: variable 'freezer_alarmtype' set but not used [-Wunused-but-set-global]
54 | static enum alarmtimer_type freezer_alarmtype;
| ^
kernel/time/alarmtimer.c:55:16: warning: variable 'freezer_expires' set but not used [-Wunused-but-set-global]
55 | static ktime_t freezer_expires;
| ^
3 warnings generated.
--
In file included from arch/arm/kernel/asm-offsets.c:14:
In file included from include/linux/mm.h:8:
In file included from include/linux/gfp.h:7:
In file included from include/linux/mmzone.h:22:
>> include/linux/mm_types.h:865:28: warning: declaration of 'struct vm_area_desc' will not be visible outside of this function [-Wvisibility]
865 | void (*abort_hook)(struct vm_area_desc *desc);
| ^
1 warning generated.
In file included from kernel/sched/rq-offsets.c:5:
In file included from kernel/sched/sched.h:15:
In file included from include/linux/sched/mm.h:8:
>> include/linux/mm_types.h:865:28: warning: declaration of 'struct vm_area_desc' will not be visible outside of this function [-Wvisibility]
865 | void (*abort_hook)(struct vm_area_desc *desc);
| ^
1 warning generated.
vim +865 include/linux/mm_types.h
820
821 /*
822 * Describes an action an mmap_prepare hook can instruct to be taken to complete
823 * the mapping of a VMA. Specified in vm_area_desc.
824 */
825 struct mmap_action {
826 union {
827 struct {
828 unsigned long start;
829 unsigned long start_pfn;
830 unsigned long size;
831 pgprot_t pgprot;
832 } remap;
833 struct {
834 phys_addr_t start_phys_addr;
835 unsigned long size;
836 } simple_ioremap;
837 struct {
838 unsigned long start;
839 struct page **pages;
840 unsigned long nr_pages;
841 pgoff_t pgoff;
842 } map_kernel;
843 };
844 enum mmap_action_type type;
845
846 /*
847 * If specified, this hook is invoked after the selected action has been
848 * successfully completed. Note that the VMA write lock still held.
849 *
850 * The absolute minimum ought to be done here.
851 *
852 * Returns 0 on success, or an error code.
853 */
854 int (*success_hook)(const struct vm_area_struct *vma);
855
856 /*
857 * If specified, this hook is invoked when an error occurred when
858 * attempting the selected action.
859 *
860 * The hook can return an error code in order to filter the error, but
861 * it is not valid to clear the error here.
862 */
863 int (*error_hook)(int err);
864
> 865 void (*abort_hook)(struct vm_area_desc *desc);
866
867 /*
868 * This should be set in rare instances where the operation required
869 * that the rmap should not be able to access the VMA until
870 * completely set up.
871 */
872 bool hide_from_rmap_until_complete :1;
873 };
874
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next parent reply other threads:[~2026-05-01 22:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260425070700.562229-1-25181214217@stu.xidian.edu.cn>
2026-05-01 22:03 ` kernel test robot [this message]
2026-05-01 22:14 ` [RFC PATCH] mm/hugetlb: fix resv_map memory leak in __mmap_region error path kernel test robot
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=202605020650.VNBzVdYb-lkp@intel.com \
--to=lkp@intel.com \
--cc=25181214217@stu.xidian.edu.cn \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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