Re: [PATCH] mm/kfence: reset PG_slab and memcg_data before freeing __kfence_pool

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

 



Hi Hyeonggon,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on hnaz-mm/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Hyeonggon-Yoo/mm-kfence-reset-PG_slab-and-memcg_data-before-freeing-__kfence_pool/20220505-150237
base:   https://github.com/hnaz/linux-mm master
config: s390-randconfig-r044-20220505 (https://download.01.org/0day-ci/archive/20220505/202205051852.M26PcwNj-lkp@xxxxxxxxx/config)
compiler: s390-linux-gcc (GCC) 11.3.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://github.com/intel-lab-lkp/linux/commit/ad166fcbcd464ea0251165580e1ea0152531fe56
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Hyeonggon-Yoo/mm-kfence-reset-PG_slab-and-memcg_data-before-freeing-__kfence_pool/20220505-150237
        git checkout ad166fcbcd464ea0251165580e1ea0152531fe56
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash mm/kfence/

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

All errors (new ones prefixed by >>):

   mm/kfence/core.c: In function 'kfence_init_pool_early':
>> mm/kfence/core.c:634:21: error: 'struct page' has no member named 'memcg_data'
     634 |                 page->memcg_data = 0;
         |                     ^~


vim +634 mm/kfence/core.c

   610	
   611	static bool __init kfence_init_pool_early(void)
   612	{
   613		unsigned long addr;
   614	
   615		if (!__kfence_pool)
   616			return false;
   617	
   618		addr = kfence_init_pool();
   619	
   620		if (!addr)
   621			return true;
   622	
   623		/*
   624		 * Only release unprotected pages, and do not try to go back and change
   625		 * page attributes due to risk of failing to do so as well. If changing
   626		 * page attributes for some pages fails, it is very likely that it also
   627		 * fails for the first page, and therefore expect addr==__kfence_pool in
   628		 * most failure cases.
   629		 */
   630		for (char *p = (char *)addr; p < __kfence_pool + KFENCE_POOL_SIZE; p += PAGE_SIZE) {
   631			struct page *page;
   632	
   633			page = virt_to_page(p);
 > 634			page->memcg_data = 0;
   635			__ClearPageSlab(page);
   636		}
   637		memblock_free_late(__pa(addr), KFENCE_POOL_SIZE - (addr - (unsigned long)__kfence_pool));
   638		__kfence_pool = NULL;
   639		return false;
   640	}
   641	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp




[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