From: kernel test robot <lkp@intel.com>
To: Hao Ge <gehao@kylinos.cn>
Cc: oe-kbuild-all@lists.linux.dev,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [akpm-mm:mm-unstable 31/159] lib/alloc_tag.c:641:17: error: implicit declaration of function 'kmemleak_igonore_percpu'; did you mean 'kmemleak_ignore_phys'?
Date: Fri, 20 Jun 2025 15:53:49 +0800 [thread overview]
Message-ID: <202506201556.3CQsVRca-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head: 2cdf4156ee65d8b988f460ee2c8802ea7c455fa7
commit: 5b70675cebc3dfcdb355054122698de788cb052d [31/159] mm/alloc_tag: fix the kmemleak false positive issue in the allocation of the percpu variable tag->counters
config: csky-randconfig-001-20250620 (https://download.01.org/0day-ci/archive/20250620/202506201556.3CQsVRca-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 13.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250620/202506201556.3CQsVRca-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/202506201556.3CQsVRca-lkp@intel.com/
All errors (new ones prefixed by >>):
lib/alloc_tag.c: In function 'load_module':
>> lib/alloc_tag.c:641:17: error: implicit declaration of function 'kmemleak_igonore_percpu'; did you mean 'kmemleak_ignore_phys'? [-Werror=implicit-function-declaration]
641 | kmemleak_igonore_percpu(tag->counters);
| ^~~~~~~~~~~~~~~~~~~~~~~
| kmemleak_ignore_phys
cc1: some warnings being treated as errors
vim +641 lib/alloc_tag.c
610
611 static int load_module(struct module *mod, struct codetag *start, struct codetag *stop)
612 {
613 /* Allocate module alloc_tag percpu counters */
614 struct alloc_tag *start_tag;
615 struct alloc_tag *stop_tag;
616 struct alloc_tag *tag;
617
618 /* percpu counters for core allocations are already statically allocated */
619 if (!mod)
620 return 0;
621
622 start_tag = ct_to_alloc_tag(start);
623 stop_tag = ct_to_alloc_tag(stop);
624 for (tag = start_tag; tag < stop_tag; tag++) {
625 WARN_ON(tag->counters);
626 tag->counters = alloc_percpu(struct alloc_tag_counters);
627 if (!tag->counters) {
628 while (--tag >= start_tag) {
629 free_percpu(tag->counters);
630 tag->counters = NULL;
631 }
632 pr_err("Failed to allocate memory for allocation tag percpu counters in the module %s\n",
633 mod->name);
634 return -ENOMEM;
635 }
636
637 /*
638 * Avoid a kmemleak false positive. The pointer to the counters is stored
639 * in the alloc_tag section of the module and cannot be directly accessed.
640 */
> 641 kmemleak_igonore_percpu(tag->counters);
642 }
643 return 0;
644 }
645
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-06-20 7:54 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=202506201556.3CQsVRca-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=gehao@kylinos.cn \
--cc=linux-mm@kvack.org \
--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