From: kernel test robot <lkp@intel.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [rcu:dev.2020.12.08a 96/97] mm/slab_common.c:583: undefined reference to `kmem_struct_debug_provenance'
Date: Wed, 9 Dec 2020 07:46:24 +0800 [thread overview]
Message-ID: <202012090722.a8hLT2LU-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2970 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2020.12.08a
head: c5c1f436c5434ca260106aa0713ec8e4de3cba22
commit: f1bf0344f92961c0691b3baeaa1c2f23bb076bc8 [96/97] mm: Add kmalloc_debug_print_provenance() to print source of memory block
config: i386-randconfig-s002-20201208 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-179-ga00755aa-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/commit/?id=f1bf0344f92961c0691b3baeaa1c2f23bb076bc8
git remote add rcu https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
git fetch --no-tags rcu dev.2020.12.08a
git checkout f1bf0344f92961c0691b3baeaa1c2f23bb076bc8
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
ld: mm/slab_common.o: in function `kmalloc_debug_print_provenance':
>> mm/slab_common.c:583: undefined reference to `kmem_struct_debug_provenance'
vim +583 mm/slab_common.c
557
558 /**
559 * kmalloc_debug_print_provenance - Print available provenance information
560 * @object: object for which to find provenance information.
561 *
562 * This function uses pr_cont(), so that the caller is expected to have
563 * printed out whatever preamble is appropriate. The provenance information
564 * depends on the type of object and on how much debugging is enabled.
565 * For a slab-cache object, the slab name is printed, and, if available,
566 * the return address and stack trace from the allocation of that object.
567 */
568 void kmalloc_debug_print_provenance(void *object)
569 {
570 int i;
571 struct page *page;
572 struct kmem_provenance kp;
573
574 if (!virt_addr_valid(object)) {
575 pr_cont(" non-paged (local) memory.\n");
576 return;
577 }
578 page = virt_to_head_page(object);
579 kp.kp_ptr = object;
580 kp.kp_page = page;
581 kp.kp_nstack = KS_ADDRS_COUNT;
582 if (PageSlab(page)) {
> 583 kmem_struct_debug_provenance(&kp);
584 if (page->slab_cache)
585 pr_cont(" slab %s", page->slab_cache->name);
586 if (kp.kp_ret)
587 pr_cont(" allocated at %pS\n", kp.kp_ret);
588 if (kp.kp_stack[0]) {
589 for (i = 0; i < ARRAY_SIZE(kp.kp_stack); i++) {
590 if (!kp.kp_stack[i])
591 break;
592 pr_info(" %pS\n", kp.kp_stack[i]);
593 }
594 }
595 return;
596 }
597 pr_cont(" non-slab memory.\n");
598 }
599 EXPORT_SYMBOL_GPL(kmalloc_debug_print_provenance);
600
---
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: 34953 bytes --]
next reply other threads:[~2020-12-08 23:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-08 23:46 kernel test robot [this message]
2020-12-08 23:59 ` Paul E. McKenney
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=202012090722.a8hLT2LU-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
/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
all inboxes | Powered by JetHome®