* [rcu:rcu/next 94/101] mm/slab_common.c:555: undefined reference to `kmem_cache_last_alloc'
@ 2020-12-04 4:53 kernel test robot
2020-12-04 19:22 ` Paul E. McKenney
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2020-12-04 4:53 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: kbuild-all, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1978 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/next
head: 413d9f332cbd16d951c22a41f2e5f53c1a75ae1c
commit: f7c3fb4fc476a8a7a3cfc78cffbf1de13c1899b7 [94/101] mm: Add kmem_last_alloc() to return last allocation for memory block
config: i386-randconfig-p001-20201204 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/commit/?id=f7c3fb4fc476a8a7a3cfc78cffbf1de13c1899b7
git remote add rcu https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
git fetch --no-tags rcu rcu/next
git checkout f7c3fb4fc476a8a7a3cfc78cffbf1de13c1899b7
# save the attached .config to linux build tree
make W=1 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 `kmem_last_alloc':
>> mm/slab_common.c:555: undefined reference to `kmem_cache_last_alloc'
vim +555 mm/slab_common.c
538
539 /*
540 * If the pointer references a slab-allocated object and if sufficient
541 * debugging is enabled, return the returrn address for the corresponding
542 * allocation. Otherwise, return NULL. Note that passing random pointers
543 * to this function (including addresses of on-stack variables) is likely
544 * to result in panics.
545 */
546 void *kmem_last_alloc(void *object)
547 {
548 struct page *page;
549
550 if (!virt_addr_valid(object))
551 return NULL;
552 page = virt_to_head_page(object);
553 if (!PageSlab(page))
554 return NULL;
> 555 return kmem_cache_last_alloc(page->slab_cache, object);
556 }
557 EXPORT_SYMBOL_GPL(kmem_last_alloc);
558
---
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: 34838 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [rcu:rcu/next 94/101] mm/slab_common.c:555: undefined reference to `kmem_cache_last_alloc'
2020-12-04 4:53 [rcu:rcu/next 94/101] mm/slab_common.c:555: undefined reference to `kmem_cache_last_alloc' kernel test robot
@ 2020-12-04 19:22 ` Paul E. McKenney
0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2020-12-04 19:22 UTC (permalink / raw)
To: kernel test robot; +Cc: kbuild-all, linux-kernel
On Fri, Dec 04, 2020 at 12:53:56PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/next
> head: 413d9f332cbd16d951c22a41f2e5f53c1a75ae1c
> commit: f7c3fb4fc476a8a7a3cfc78cffbf1de13c1899b7 [94/101] mm: Add kmem_last_alloc() to return last allocation for memory block
> config: i386-randconfig-p001-20201204 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> reproduce (this is a W=1 build):
> # https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/commit/?id=f7c3fb4fc476a8a7a3cfc78cffbf1de13c1899b7
> git remote add rcu https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
> git fetch --no-tags rcu rcu/next
> git checkout f7c3fb4fc476a8a7a3cfc78cffbf1de13c1899b7
> # save the attached .config to linux build tree
> make W=1 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 `kmem_last_alloc':
> >> mm/slab_common.c:555: undefined reference to `kmem_cache_last_alloc'
>
> vim +555 mm/slab_common.c
Good catch! I had no idea that the slab definition of the
kmem_cache_last_alloc() function was under CONFIG_NUMA...
Will fold a fix in with attribution.
Thanx, Paul
> 538
> 539 /*
> 540 * If the pointer references a slab-allocated object and if sufficient
> 541 * debugging is enabled, return the returrn address for the corresponding
> 542 * allocation. Otherwise, return NULL. Note that passing random pointers
> 543 * to this function (including addresses of on-stack variables) is likely
> 544 * to result in panics.
> 545 */
> 546 void *kmem_last_alloc(void *object)
> 547 {
> 548 struct page *page;
> 549
> 550 if (!virt_addr_valid(object))
> 551 return NULL;
> 552 page = virt_to_head_page(object);
> 553 if (!PageSlab(page))
> 554 return NULL;
> > 555 return kmem_cache_last_alloc(page->slab_cache, object);
> 556 }
> 557 EXPORT_SYMBOL_GPL(kmem_last_alloc);
> 558
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-04 19:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04 4:53 [rcu:rcu/next 94/101] mm/slab_common.c:555: undefined reference to `kmem_cache_last_alloc' kernel test robot
2020-12-04 19:22 ` 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;
as well as URLs for NNTP newsgroup(s).