[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'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx/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@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408231147.3U7tgk1x-lkp@xxxxxxxxx/

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux