Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [vbabka:b4/slub-slab-validation 11/12] mm/slub.c:2825:4: error: call to undeclared function 'slab_err'; ISO C99 and later do not support implicit function declarations
Date: Fri, 12 Sep 2025 12:36:10 +0800	[thread overview]
Message-ID: <202509121225.u1EPShJO-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git b4/slub-slab-validation
head:   01cb8fd75b321601e835ec2e501a2ca32378cec5
commit: 4da56ac925d6c6314912bf7651137988dcb34a7b [11/12] slab: validate slab before using it in alloc_single_from_partial()
config: riscv-randconfig-001-20250912 (https://download.01.org/0day-ci/archive/20250912/202509121225.u1EPShJO-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250912/202509121225.u1EPShJO-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/202509121225.u1EPShJO-lkp@intel.com/

All errors (new ones prefixed by >>):

>> mm/slub.c:2825:4: error: call to undeclared function 'slab_err'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                           slab_err(s, slab, "Not a valid slab page");
                           ^
   1 error generated.


vim +/slab_err +2825 mm/slub.c

  2809	
  2810	/*
  2811	 * Called only for kmem_cache_debug() caches instead of remove_partial(), with a
  2812	 * slab from the n->partial list. Remove only a single object from the slab, do
  2813	 * the alloc_debug_processing() checks and leave the slab on the list, or move
  2814	 * it to full list if it was the last free object.
  2815	 */
  2816	static void *alloc_single_from_partial(struct kmem_cache *s,
  2817			struct kmem_cache_node *n, struct slab *slab, int orig_size)
  2818	{
  2819		void *object;
  2820	
  2821		lockdep_assert_held(&n->list_lock);
  2822	
  2823		if (s->flags & SLAB_CONSISTENCY_CHECKS) {
  2824			if (!validate_slab_ptr(slab)) {
> 2825				slab_err(s, slab, "Not a valid slab page");
  2826				return NULL;
  2827			}
  2828		}
  2829	
  2830		object = slab->freelist;
  2831		slab->freelist = get_freepointer(s, object);
  2832		slab->inuse++;
  2833	
  2834		if (!alloc_debug_processing(s, slab, object, orig_size))
  2835			return NULL;
  2836	
  2837		if (slab->inuse == slab->objects) {
  2838			remove_partial(n, slab);
  2839			add_full(s, n, slab);
  2840		}
  2841	
  2842		return object;
  2843	}
  2844	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2025-09-12  4:37 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=202509121225.u1EPShJO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=vbabka@suse.cz \
    /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