Re: [PATCH] mm/memcg: fix UAF in drain_all_stock() async work during offline
From: kernel test robot
Date: Thu Aug 27 2026 - 23:23:03 EST
Hi Rik,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
url: https://github.com/intel-lab-lkp/linux/commits/Rik-van-Riel/mm-memcg-fix-UAF-in-drain_all_stock-async-work-during-offline/20260827-124211
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20260827124211.3b94b103%40fangorn
patch subject: [PATCH] mm/memcg: fix UAF in drain_all_stock() async work during offline
config: xtensa-randconfig-r073-20260828 (https://download.01.org/0day-ci/archive/20260828/202608281149.3OqBLtQa-lkp@xxxxxxxxx/config)
compiler: xtensa-linux-gcc (GCC) 16.1.0
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260828/202608281149.3OqBLtQa-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/202608281149.3OqBLtQa-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
>> mm/memcontrol.c:2380:6: warning: no previous prototype for 'drain_all_stock_sync' [-Wmissing-prototypes]
2380 | void drain_all_stock_sync(struct mem_cgroup *root_memcg)
| ^~~~~~~~~~~~~~~~~~~~
vim +/drain_all_stock_sync +2380 mm/memcontrol.c
2379
> 2380 void drain_all_stock_sync(struct mem_cgroup *root_memcg)
2381 {
2382 /*
2383 * Make sure the workqueue is done with this memcg
2384 * before freeing it.
2385 */
2386 __drain_all_stock(root_memcg, true);
2387 flush_workqueue(memcg_wq);
2388 }
2389
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki