[linux-next:master 3421/3897] mm/kasan/shadow.c:528:33: error: 'VM_DELAY_KMEMLEAK' undeclared; did you mean 'VM_DEFER_KMEMLEAK'?

[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:   f30a24ed97b401416118756fa35fbe5d28f999e3
commit: f61bc9ffcab1688372969e3cbb36cab83f045c22 [3421/3897] mm: defer kmemleak object creation of module_alloc()
config: xtensa-allyesconfig (https://download.01.org/0day-ci/archive/20211127/202111271833.jSwKL4dZ-lkp@xxxxxxxxx/config)
compiler: xtensa-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f61bc9ffcab1688372969e3cbb36cab83f045c22
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout f61bc9ffcab1688372969e3cbb36cab83f045c22
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=xtensa SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

Note: the linux-next/master HEAD f30a24ed97b401416118756fa35fbe5d28f999e3 builds fine.
      It may have been fixed somewhere.

All errors (new ones prefixed by >>):

   mm/kasan/shadow.c: In function 'kasan_module_alloc':
>> mm/kasan/shadow.c:528:33: error: 'VM_DELAY_KMEMLEAK' undeclared (first use in this function); did you mean 'VM_DEFER_KMEMLEAK'?
     528 |                 if (vm->flags & VM_DELAY_KMEMLEAK)
         |                                 ^~~~~~~~~~~~~~~~~
         |                                 VM_DEFER_KMEMLEAK
   mm/kasan/shadow.c:528:33: note: each undeclared identifier is reported only once for each function it appears in


vim +528 mm/kasan/shadow.c

   500	
   501	int kasan_module_alloc(void *addr, size_t size, gfp_t gfp_mask)
   502	{
   503		void *ret;
   504		size_t scaled_size;
   505		size_t shadow_size;
   506		unsigned long shadow_start;
   507	
   508		shadow_start = (unsigned long)kasan_mem_to_shadow(addr);
   509		scaled_size = (size + KASAN_GRANULE_SIZE - 1) >>
   510					KASAN_SHADOW_SCALE_SHIFT;
   511		shadow_size = round_up(scaled_size, PAGE_SIZE);
   512	
   513		if (WARN_ON(!PAGE_ALIGNED(shadow_start)))
   514			return -EINVAL;
   515	
   516		ret = __vmalloc_node_range(shadow_size, 1, shadow_start,
   517				shadow_start + shadow_size,
   518				GFP_KERNEL,
   519				PAGE_KERNEL, VM_NO_GUARD, NUMA_NO_NODE,
   520				__builtin_return_address(0));
   521	
   522		if (ret) {
   523			struct vm_struct *vm = find_vm_area(addr);
   524			__memset(ret, KASAN_SHADOW_INIT, shadow_size);
   525			vm->flags |= VM_KASAN;
   526			kmemleak_ignore(ret);
   527	
 > 528			if (vm->flags & VM_DELAY_KMEMLEAK)
   529				kmemleak_vmalloc(vm, size, gfp_mask);
   530	
   531			return 0;
   532		}
   533	
   534		return -ENOMEM;
   535	}
   536	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx




[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