lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202602090941.opY2jzUD-lkp@intel.com>
Date: Mon, 9 Feb 2026 10:01:32 +0800
From: kernel test robot <lkp@...el.com>
To: Nhat Pham <nphamcs@...il.com>, linux-mm@...ck.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	akpm@...ux-foundation.org, hannes@...xchg.org, hughd@...gle.com,
	yosry.ahmed@...ux.dev, mhocko@...nel.org, roman.gushchin@...ux.dev,
	shakeel.butt@...ux.dev, muchun.song@...ux.dev, len.brown@...el.com,
	chengming.zhou@...ux.dev, kasong@...cent.com, chrisl@...nel.org,
	huang.ying.caritas@...il.com, ryan.roberts@....com,
	shikemeng@...weicloud.com, viro@...iv.linux.org.uk,
	baohua@...nel.org, bhe@...hat.com, osalvador@...e.de,
	lorenzo.stoakes@...cle.com, christophe.leroy@...roup.eu,
	pavel@...nel.org, kernel-team@...a.com,
	linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
	linux-pm@...r.kernel.org, peterx@...hat.com, riel@...riel.com,
	joshua.hahnjy@...il.com
Subject: Re: [PATCH v3 18/20] memcg: swap: only charge physical swap slots

Hi Nhat,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.19]
[cannot apply to akpm-mm/mm-everything tj-cgroup/for-next tip/smp/core next-20260205]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Nhat-Pham/swap-rearrange-the-swap-header-file/20260209-065842
base:   linus/master
patch link:    https://lore.kernel.org/r/20260208215839.87595-19-nphamcs%40gmail.com
patch subject: [PATCH v3 18/20] memcg: swap: only charge physical swap slots
config: hexagon-randconfig-001-20260209 (https://download.01.org/0day-ci/archive/20260209/202602090941.opY2jzUD-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260209/202602090941.opY2jzUD-lkp@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602090941.opY2jzUD-lkp@intel.com/

All errors (new ones prefixed by >>):

>> mm/memcontrol-v1.c:688:3: error: call to undeclared function 'mem_cgroup_clear_swap'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   mem_cgroup_clear_swap(entry, nr_pages);
                   ^
   mm/memcontrol-v1.c:688:3: note: did you mean 'mem_cgroup_uncharge_swap'?
   include/linux/swap.h:658:20: note: 'mem_cgroup_uncharge_swap' declared here
   static inline void mem_cgroup_uncharge_swap(swp_entry_t entry,
                      ^
   1 error generated.


vim +/mem_cgroup_clear_swap +688 mm/memcontrol-v1.c

   651	
   652	/*
   653	 * memcg1_swapin - uncharge swap slot
   654	 * @entry: the first swap entry for which the pages are charged
   655	 * @nr_pages: number of pages which will be uncharged
   656	 *
   657	 * Call this function after successfully adding the charged page to swapcache.
   658	 *
   659	 * Note: This function assumes the page for which swap slot is being uncharged
   660	 * is order 0 page.
   661	 */
   662	void memcg1_swapin(swp_entry_t entry, unsigned int nr_pages)
   663	{
   664		/*
   665		 * Cgroup1's unified memory+swap counter has been charged with the
   666		 * new swapcache page, finish the transfer by uncharging the swap
   667		 * slot. The swap slot would also get uncharged when it dies, but
   668		 * it can stick around indefinitely and we'd count the page twice
   669		 * the entire time.
   670		 *
   671		 * Cgroup2 has separate resource counters for memory and swap,
   672		 * so this is a non-issue here. Memory and swap charge lifetimes
   673		 * correspond 1:1 to page and swap slot lifetimes: we charge the
   674		 * page to memory here, and uncharge swap when the slot is freed.
   675		 */
   676		if (do_memsw_account()) {
   677			/*
   678			 * The swap entry might not get freed for a long time,
   679			 * let's not wait for it.  The page already received a
   680			 * memory+swap charge, drop the swap entry duplicate.
   681			 */
   682			mem_cgroup_uncharge_swap(entry, nr_pages);
   683	
   684			/*
   685			 * Clear the cgroup association now to prevent double memsw
   686			 * uncharging when the backends are released later.
   687			 */
 > 688			mem_cgroup_clear_swap(entry, nr_pages);
   689		}
   690	}
   691	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ