Re: [PATCH] kernfs: Use RCU for kernfs_node::name lookup.
From: kernel test robot
Date: Sun Nov 10 2024 - 23:50:57 EST
Hi Sebastian,
kernel test robot noticed the following build warnings:
[auto build test WARNING on driver-core/driver-core-testing]
[also build test WARNING on driver-core/driver-core-next driver-core/driver-core-linus linus/master v6.12-rc7 next-20241108]
[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/Sebastian-Andrzej-Siewior/kernfs-Use-RCU-for-kernfs_node-name-lookup/20241109-062450
base: driver-core/driver-core-testing
patch link: https://lore.kernel.org/r/20241108222406.n5azgO98%40linutronix.de
patch subject: [PATCH] kernfs: Use RCU for kernfs_node::name lookup.
config: x86_64-randconfig-122-20241111 (https://download.01.org/0day-ci/archive/20241111/202411111204.JebDWFvY-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/20241111/202411111204.JebDWFvY-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/202411111204.JebDWFvY-lkp@xxxxxxxxx/
sparse warnings: (new ones prefixed by >>)
>> fs/sysfs/dir.c:126:51: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected char const *new_name @@ got char const [noderef] __rcu *name @@
fs/sysfs/dir.c:126:51: sparse: expected char const *new_name
fs/sysfs/dir.c:126:51: sparse: got char const [noderef] __rcu *name
--
>> arch/x86/kernel/cpu/resctrl/pseudo_lock.c:1363:65: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *name @@ got char const [noderef] __rcu *name @@
arch/x86/kernel/cpu/resctrl/pseudo_lock.c:1363:65: sparse: expected char const *name
arch/x86/kernel/cpu/resctrl/pseudo_lock.c:1363:65: sparse: got char const [noderef] __rcu *name
arch/x86/kernel/cpu/resctrl/pseudo_lock.c: note: in included file (through include/linux/smp.h, include/linux/lockdep.h, include/linux/spinlock.h, ...):
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
--
>> arch/x86/kernel/cpu/resctrl/rdtgroup.c:3654:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const * @@ got char const [noderef] __rcu *name @@
arch/x86/kernel/cpu/resctrl/rdtgroup.c:3654:27: sparse: expected char const *
arch/x86/kernel/cpu/resctrl/rdtgroup.c:3654:27: sparse: got char const [noderef] __rcu *name
>> arch/x86/kernel/cpu/resctrl/rdtgroup.c:3793:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected char const *name @@ got char const [noderef] __rcu *name @@
arch/x86/kernel/cpu/resctrl/rdtgroup.c:3793:45: sparse: expected char const *name
arch/x86/kernel/cpu/resctrl/rdtgroup.c:3793:45: sparse: got char const [noderef] __rcu *name
arch/x86/kernel/cpu/resctrl/rdtgroup.c:3879:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected char const *name @@ got char const [noderef] __rcu *name @@
arch/x86/kernel/cpu/resctrl/rdtgroup.c:3879:42: sparse: expected char const *name
arch/x86/kernel/cpu/resctrl/rdtgroup.c:3879:42: sparse: got char const [noderef] __rcu *name
arch/x86/kernel/cpu/resctrl/rdtgroup.c: note: in included file (through include/linux/smp.h, include/linux/lockdep.h, include/linux/spinlock.h, ...):
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
vim +126 fs/sysfs/dir.c
ca1bab38195d66 Eric W. Biederman 2009-11-20 116
e34ff4906199d2 Tejun Heo 2013-09-11 117 int sysfs_move_dir_ns(struct kobject *kobj, struct kobject *new_parent_kobj,
e34ff4906199d2 Tejun Heo 2013-09-11 118 const void *new_ns)
8a82472f86bf69 Cornelia Huck 2006-11-20 119 {
324a56e16e44ba Tejun Heo 2013-12-11 120 struct kernfs_node *kn = kobj->sd;
324a56e16e44ba Tejun Heo 2013-12-11 121 struct kernfs_node *new_parent;
8a82472f86bf69 Cornelia Huck 2006-11-20 122
324a56e16e44ba Tejun Heo 2013-12-11 123 new_parent = new_parent_kobj && new_parent_kobj->sd ?
324a56e16e44ba Tejun Heo 2013-12-11 124 new_parent_kobj->sd : sysfs_root_kn;
51225039f3cf9d Tejun Heo 2007-06-14 125
adc5e8b58f4886 Tejun Heo 2013-12-11 @126 return kernfs_rename_ns(kn, new_parent, kn->name, new_ns);
8a82472f86bf69 Cornelia Huck 2006-11-20 127 }
87d2846fcf8811 Eric W. Biederman 2015-05-13 128
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki