Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [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
@ 2025-09-12  4:36 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-09-12  4:36 UTC (permalink / raw)
  To: Vlastimil Babka; +Cc: llvm, oe-kbuild-all

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-12  4:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-12  4:36 [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 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox