[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202409010209.FqYOzYEa-lkp@intel.com>
Date: Sun, 1 Sep 2024 02:47:27 +0800
From: kernel test robot <lkp@...el.com>
To: Chunhui Li <chunhui.li@...iatek.com>,
Luis Chamberlain <mcgrof@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-modules@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, wsd_upstream@...iatek.com,
Chunhui Li <chunhui.li@...iatek.com>,
Xion Wang <xion.wang@...iatek.com>
Subject: Re: [PATCH] module: abort module loading when sysfs setup suffer
errors
Hi Chunhui,
kernel test robot noticed the following build errors:
[auto build test ERROR on mcgrof/modules-next]
[also build test ERROR on linus/master v6.11-rc5 next-20240830]
[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/Chunhui-Li/module-abort-module-loading-when-sysfs-setup-suffer-errors/20240830-134417
base: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git modules-next
patch link: https://lore.kernel.org/r/20240830054400.26622-1-chunhui.li%40mediatek.com
patch subject: [PATCH] module: abort module loading when sysfs setup suffer errors
config: powerpc-mpc834x_itx_defconfig (https://download.01.org/0day-ci/archive/20240901/202409010209.FqYOzYEa-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 46fe36a4295f05d5d3731762e31fc4e6e99863e9)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240901/202409010209.FqYOzYEa-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/202409010209.FqYOzYEa-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from kernel/module/sysfs.c:13:
In file included from include/linux/kallsyms.h:13:
In file included from include/linux/mm.h:2228:
include/linux/vmstat.h:517:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
517 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> kernel/module/sysfs.c:400:6: error: assigning to 'int' from incompatible type 'void'
400 | err = add_sect_attrs(mod, info);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/module/sysfs.c:404:6: error: assigning to 'int' from incompatible type 'void'
404 | err = add_notes_attrs(mod, info);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 2 errors generated.
vim +400 kernel/module/sysfs.c
370
371 int mod_sysfs_setup(struct module *mod,
372 const struct load_info *info,
373 struct kernel_param *kparam,
374 unsigned int num_params)
375 {
376 int err;
377
378 err = mod_sysfs_init(mod);
379 if (err)
380 goto out;
381
382 mod->holders_dir = kobject_create_and_add("holders", &mod->mkobj.kobj);
383 if (!mod->holders_dir) {
384 err = -ENOMEM;
385 goto out_unreg;
386 }
387
388 err = module_param_sysfs_setup(mod, kparam, num_params);
389 if (err)
390 goto out_unreg_holders;
391
392 err = module_add_modinfo_attrs(mod);
393 if (err)
394 goto out_unreg_param;
395
396 err = add_usage_links(mod);
397 if (err)
398 goto out_unreg_modinfo_attrs;
399
> 400 err = add_sect_attrs(mod, info);
401 if (err)
402 goto out_unreg_sect_attrs;
403
404 err = add_notes_attrs(mod, info);
405 if (err)
406 goto out_unreg_notes_attrs;
407
408 return 0;
409
410 out_unreg_notes_attrs:
411 remove_notes_attrs(mod);
412 out_unreg_sect_attrs:
413 remove_sect_attrs(mod);
414 out_unreg_modinfo_attrs:
415 module_remove_modinfo_attrs(mod, -1);
416 out_unreg_param:
417 module_param_sysfs_remove(mod);
418 out_unreg_holders:
419 kobject_put(mod->holders_dir);
420 out_unreg:
421 mod_kobject_put(mod);
422 out:
423 return err;
424 }
425
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists