linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [arnd-playground:mm-6.9-test-merge-for-roxell 62/421] mm/kmemleak.c:466:26: error: implicit declaration of function 'kmem_cache_alloc_noprof'; did you mean 'kmem_cache_alloc_node'?
@ 2024-08-23  3:12 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-08-23  3:12 UTC (permalink / raw)
  To: Kees Cook
  Cc: oe-kbuild-all, Arnd Bergmann, Andrew Morton,
	Linux Memory Management List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git mm-6.9-test-merge-for-roxell
head:   f6cdadcb0c9861e379739044d6e4a20911da851a
commit: de0ecc240fae03c3bb887c6265bc9a1529b600fb [62/421] mm/slub: avoid recursive loop with kmemleak
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20240823/202408231147.3U7tgk1x-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240823/202408231147.3U7tgk1x-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/202408231147.3U7tgk1x-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   mm/kmemleak.c: In function 'mem_pool_alloc':
>> mm/kmemleak.c:466:26: error: implicit declaration of function 'kmem_cache_alloc_noprof'; did you mean 'kmem_cache_alloc_node'? [-Werror=implicit-function-declaration]
     466 |                 object = kmem_cache_alloc_noprof(object_cache, gfp_kmemleak_mask(gfp));
         |                          ^~~~~~~~~~~~~~~~~~~~~~~
         |                          kmem_cache_alloc_node
>> mm/kmemleak.c:466:24: warning: assignment to 'struct kmemleak_object *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     466 |                 object = kmem_cache_alloc_noprof(object_cache, gfp_kmemleak_mask(gfp));
         |                        ^
   mm/kmemleak.c: In function 'add_scan_area':
>> mm/kmemleak.c:950:22: warning: assignment to 'struct kmemleak_scan_area *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     950 |                 area = kmem_cache_alloc_noprof(scan_area_cache, gfp_kmemleak_mask(gfp));
         |                      ^
   cc1: some warnings being treated as errors


vim +466 mm/kmemleak.c

   455	
   456	/*
   457	 * Memory pool allocation and freeing. kmemleak_lock must not be held.
   458	 */
   459	static struct kmemleak_object *mem_pool_alloc(gfp_t gfp)
   460	{
   461		unsigned long flags;
   462		struct kmemleak_object *object;
   463	
   464		/* try the slab allocator first */
   465		if (object_cache) {
 > 466			object = kmem_cache_alloc_noprof(object_cache, gfp_kmemleak_mask(gfp));
   467			if (object)
   468				return object;
   469		}
   470	
   471		/* slab allocation failed, try the memory pool */
   472		raw_spin_lock_irqsave(&kmemleak_lock, flags);
   473		object = list_first_entry_or_null(&mem_pool_free_list,
   474						  typeof(*object), object_list);
   475		if (object)
   476			list_del(&object->object_list);
   477		else if (mem_pool_free_count)
   478			object = &mem_pool[--mem_pool_free_count];
   479		else
   480			pr_warn_once("Memory pool empty, consider increasing CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE\n");
   481		raw_spin_unlock_irqrestore(&kmemleak_lock, flags);
   482	
   483		return object;
   484	}
   485	

-- 
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:[~2024-08-23  3:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-23  3:12 [arnd-playground:mm-6.9-test-merge-for-roxell 62/421] mm/kmemleak.c:466:26: error: implicit declaration of function 'kmem_cache_alloc_noprof'; did you mean 'kmem_cache_alloc_node'? 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