[linux-next:master 9655/10295] mm/kasan/common.c:511:53: sparse: sparse: incorrect type in argument 3 (different base types)

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   39676dfe52331dba909c617f213fdb21015c8d10
commit: 3f38c3c5bc402c3b13c3bc08fbbdecb70e4164a9 [9655/10295] kasan: save alloc stack traces for mempool
config: powerpc-randconfig-r123-20231227 (https://download.01.org/0day-ci/archive/20231227/202312271042.FsuPQlul-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20231227/202312271042.FsuPQlul-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/202312271042.FsuPQlul-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
   mm/kasan/common.c:280:6: sparse: sparse: symbol 'unpoison_slab_object' was not declared. Should it be static?
>> mm/kasan/common.c:511:53: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected restricted gfp_t [usertype] flags @@     got unsigned int [usertype] size @@
   mm/kasan/common.c:511:53: sparse:     expected restricted gfp_t [usertype] flags
   mm/kasan/common.c:511:53: sparse:     got unsigned int [usertype] size

vim +511 mm/kasan/common.c

   489	
   490	void __kasan_mempool_unpoison_object(void *ptr, size_t size, unsigned long ip)
   491	{
   492		struct slab *slab;
   493		gfp_t flags = 0; /* Might be executing under a lock. */
   494	
   495		if (is_kfence_address(kasan_reset_tag(ptr)))
   496			return;
   497	
   498		slab = virt_to_slab(ptr);
   499	
   500		/*
   501		 * This function can be called for large kmalloc allocation that get
   502		 * their memory from page_alloc.
   503		 */
   504		if (unlikely(!slab)) {
   505			kasan_unpoison(ptr, size, false);
   506			poison_kmalloc_large_redzone(ptr, size, flags);
   507			return;
   508		}
   509	
   510		/* Unpoison the object and save alloc info for non-kmalloc() allocations. */
 > 511		unpoison_slab_object(slab->slab_cache, ptr, size, flags);
   512	
   513		/* Poison the redzone and save alloc info for kmalloc() allocations. */
   514		if (is_kmalloc_cache(slab->slab_cache))
   515			poison_kmalloc_redzone(slab->slab_cache, ptr, size, flags);
   516	}
   517	

-- 
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