linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: Re: [rcu:rcu/next 94/101] mm/slab_common.c:555: undefined reference to `kmem_cache_last_alloc'
Date: Fri, 4 Dec 2020 11:22:31 -0800	[thread overview]
Message-ID: <20201204192231.GB1437@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <202012041254.XzddO1Xv-lkp@intel.com>

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



      reply	other threads:[~2020-12-04 19:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20201204192231.GB1437@paulmck-ThinkPad-P72 \
    --to=paulmck@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).