mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [rcu:dev.2020.12.08a 96/97] mm/slab_common.c:583: undefined reference to `kmem_struct_debug_provenance'
@ 2020-12-08 23:46 kernel test robot
  2020-12-08 23:59 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2020-12-08 23:46 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: kbuild-all, linux-kernel

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-09  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 23:46 [rcu:dev.2020.12.08a 96/97] mm/slab_common.c:583: undefined reference to `kmem_struct_debug_provenance' kernel test robot
2020-12-08 23:59 ` Paul E. McKenney

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®