Re: [PATCH v2] x86/nmi: Add an emergency handler in nmi_desc & use it in nmi_shootdown_cpus()

From: kernel test robot
Date: Wed Dec 04 2024 - 03:04:38 EST


Hi Waiman,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/master]
[also build test WARNING on tip/x86/core tip/auto-latest bp/for-next linus/master v6.13-rc1 next-20241203]
[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/Waiman-Long/x86-nmi-Add-an-emergency-handler-in-nmi_desc-use-it-in-nmi_shootdown_cpus/20241204-105505
base: tip/master
patch link: https://lore.kernel.org/r/20241203150732.182065-1-longman%40redhat.com
patch subject: [PATCH v2] x86/nmi: Add an emergency handler in nmi_desc & use it in nmi_shootdown_cpus()
config: i386-buildonly-randconfig-001 (https://download.01.org/0day-ci/archive/20241204/202412041510.eJUQbvy7-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241204/202412041510.eJUQbvy7-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/202412041510.eJUQbvy7-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> arch/x86/kernel/nmi.c:250: warning: Function parameter or struct member 'type' not described in 'set_emergency_nmi_handler'
>> arch/x86/kernel/nmi.c:250: warning: Function parameter or struct member 'handler' not described in 'set_emergency_nmi_handler'


vim +250 arch/x86/kernel/nmi.c

239
240 /**
241 * set_emergency_nmi_handler - Set emergency handler
242 * @handler - the emergency handler to be stored
243 * Return: 0 if success, -EEXIST if a handler had been stored
244 *
245 * Atomically set an emergency NMI handler which, if set, will be invoked
246 * before all the other handlers in the linked list. If a NULL handler is
247 * passed in, it will clear it.
248 */
249 int set_emergency_nmi_handler(unsigned int type, nmi_handler_t handler)
> 250 {
251 struct nmi_desc *desc = nmi_to_desc(type);
252 nmi_handler_t orig = NULL;
253
254 if (!handler) {
255 orig = READ_ONCE(desc->emerg_handler);
256 WARN_ON_ONCE(!orig);
257 }
258
259 if (try_cmpxchg(&desc->emerg_handler, &orig, handler))
260 return 0;
261 if (WARN_ON_ONCE(orig == handler))
262 return 0;
263 WARN_ONCE(1, "%s: failed to set emergency NMI handler!\n", __func__);
264 return -EEXIST;
265 }
266

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