[arnd-playground:mm-6.9-test-merge-for-roxell 62/421] mm/kmemleak.c:466:12: error: call to undeclared function 'kmem_cache_alloc_noprof'; ISO C99 and later do not support implicit function declarations

[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-buildonly-randconfig-005-20240823 (https://download.01.org/0day-ci/archive/20240823/202408231246.Jlz6oorc-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240823/202408231246.Jlz6oorc-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/202408231246.Jlz6oorc-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> mm/kmemleak.c:466:12: error: call to undeclared function 'kmem_cache_alloc_noprof'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     466 |                 object = kmem_cache_alloc_noprof(object_cache, gfp_kmemleak_mask(gfp));
         |                          ^
   mm/kmemleak.c:466:12: note: did you mean 'kmem_cache_alloc_node'?
   include/linux/slab.h:560:7: note: 'kmem_cache_alloc_node' declared here
     560 | void *kmem_cache_alloc_node(struct kmem_cache *s, gfp_t flags, int node) __assume_slab_alignment
         |       ^
>> mm/kmemleak.c:466:10: error: incompatible integer to pointer conversion assigning to 'struct kmemleak_object *' from 'int' [-Wint-conversion]
     466 |                 object = kmem_cache_alloc_noprof(object_cache, gfp_kmemleak_mask(gfp));
         |                        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   mm/kmemleak.c:950:10: error: call to undeclared function 'kmem_cache_alloc_noprof'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     950 |                 area = kmem_cache_alloc_noprof(scan_area_cache, gfp_kmemleak_mask(gfp));
         |                        ^
>> mm/kmemleak.c:950:8: error: incompatible integer to pointer conversion assigning to 'struct kmemleak_scan_area *' from 'int' [-Wint-conversion]
     950 |                 area = kmem_cache_alloc_noprof(scan_area_cache, gfp_kmemleak_mask(gfp));
         |                      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   4 errors generated.


vim +/kmem_cache_alloc_noprof +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