Re: [PATCH] fs/resctrl: Free mon_data structures on rdt_get_tree() failure
From: kernel test robot
Date: Sat May 09 2026 - 13:22:45 EST
Hi Tony,
kernel test robot noticed the following build warnings:
[auto build test WARNING on v7.1-rc2]
[also build test WARNING on linus/master next-20260508]
[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/Tony-Luck/fs-resctrl-Free-mon_data-structures-on-rdt_get_tree-failure/20260509-184342
base: v7.1-rc2
patch link: https://lore.kernel.org/r/20260507201730.16509-1-tony.luck%40intel.com
patch subject: [PATCH] fs/resctrl: Free mon_data structures on rdt_get_tree() failure
config: x86_64-rhel-9.4-ltp (https://download.01.org/0day-ci/archive/20260509/202605091918.1k5t3HFX-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260509/202605091918.1k5t3HFX-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/202605091918.1k5t3HFX-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
fs/resctrl/rdtgroup.c: In function 'rdt_get_tree':
fs/resctrl/rdtgroup.c:2883:17: error: implicit declaration of function 'mon_put_kn_priv' [-Wimplicit-function-declaration]
2883 | mon_put_kn_priv();
| ^~~~~~~~~~~~~~~
fs/resctrl/rdtgroup.c: At top level:
>> fs/resctrl/rdtgroup.c:3144:13: warning: conflicting types for 'mon_put_kn_priv'; have 'void(void)'
3144 | static void mon_put_kn_priv(void)
| ^~~~~~~~~~~~~~~
fs/resctrl/rdtgroup.c:3144:13: error: static declaration of 'mon_put_kn_priv' follows non-static declaration
fs/resctrl/rdtgroup.c:2883:17: note: previous implicit declaration of 'mon_put_kn_priv' with type 'void(void)'
2883 | mon_put_kn_priv();
| ^~~~~~~~~~~~~~~
vim +3144 fs/resctrl/rdtgroup.c
7168ae330e8105 James Morse 2025-05-15 3138
7168ae330e8105 James Morse 2025-05-15 3139 /**
7168ae330e8105 James Morse 2025-05-15 3140 * mon_put_kn_priv() - Free all allocated mon_data structures.
7168ae330e8105 James Morse 2025-05-15 3141 *
7168ae330e8105 James Morse 2025-05-15 3142 * Called when resctrl file system is unmounted.
7168ae330e8105 James Morse 2025-05-15 3143 */
7168ae330e8105 James Morse 2025-05-15 @3144 static void mon_put_kn_priv(void)
7168ae330e8105 James Morse 2025-05-15 3145 {
7168ae330e8105 James Morse 2025-05-15 3146 struct mon_data *priv, *tmp;
7168ae330e8105 James Morse 2025-05-15 3147
7168ae330e8105 James Morse 2025-05-15 3148 lockdep_assert_held(&rdtgroup_mutex);
7168ae330e8105 James Morse 2025-05-15 3149
7168ae330e8105 James Morse 2025-05-15 3150 list_for_each_entry_safe(priv, tmp, &mon_data_kn_priv_list, list) {
7168ae330e8105 James Morse 2025-05-15 3151 list_del(&priv->list);
7168ae330e8105 James Morse 2025-05-15 3152 kfree(priv);
7168ae330e8105 James Morse 2025-05-15 3153 }
7168ae330e8105 James Morse 2025-05-15 3154 }
7168ae330e8105 James Morse 2025-05-15 3155
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki