net/ipv4/ipmr.c:312:24: sparse: sparse: incompatible types in comparison expression (different address spaces):
From: kernel test robot
Date: Sat May 02 2026 - 12:39:37 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f1a5e78a55ebf2b05777fd5eb738038ddae609d6
commit: b3b6babf47517fde6b6de2493dea28e8831b9347 ipmr: Free mr_table after RCU grace period.
date: 5 days ago
config: nios2-randconfig-r132-20260502 (https://download.01.org/0day-ci/archive/20260503/202605030032.glNApko7-lkp@xxxxxxxxx/config)
compiler: nios2-linux-gcc (GCC) 8.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260503/202605030032.glNApko7-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
| Fixes: b3b6babf4751 ("ipmr: Free mr_table after RCU grace period.")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605030032.glNApko7-lkp@xxxxxxxxx/
sparse warnings: (new ones prefixed by >>)
net/ipv4/ipmr.c: note: in included file (through include/uapi/linux/swab.h, include/linux/swab.h, include/uapi/linux/byteorder/little_endian.h, ...):
arch/nios2/include/asm/swab.h:25:24: sparse: sparse: too many arguments for function __builtin_custom_ini
>> net/ipv4/ipmr.c:312:24: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/ipmr.c:312:24: sparse: struct mr_table [noderef] __rcu *
net/ipv4/ipmr.c:312:24: sparse: struct mr_table *
net/ipv4/ipmr.c:318:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/ipmr.c:318:16: sparse: struct mr_table [noderef] __rcu *
net/ipv4/ipmr.c:318:16: sparse: struct mr_table *
net/ipv4/ipmr.c:318:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/ipmr.c:318:16: sparse: struct mr_table [noderef] __rcu *
net/ipv4/ipmr.c:318:16: sparse: struct mr_table *
net/ipv4/ipmr.c:329:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/ipmr.c:329:16: sparse: struct mr_table [noderef] __rcu *
net/ipv4/ipmr.c:329:16: sparse: struct mr_table *
net/ipv4/ipmr.c:343:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/ipmr.c:343:9: sparse: struct mr_table [noderef] __rcu *
net/ipv4/ipmr.c:343:9: sparse: struct mr_table *
net/ipv4/ipmr.c:354:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/ipmr.c:354:32: sparse: struct mr_table [noderef] __rcu *
net/ipv4/ipmr.c:354:32: sparse: struct mr_table *
net/ipv4/ipmr.c:356:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv4/ipmr.c:356:9: sparse: struct mr_table [noderef] __rcu *
net/ipv4/ipmr.c:356:9: sparse: struct mr_table *
arch/nios2/include/asm/swab.h:25:24: sparse: sparse: too many arguments for function __builtin_custom_ini
arch/nios2/include/asm/swab.h:25:24: sparse: sparse: too many arguments for function __builtin_custom_ini
arch/nios2/include/asm/swab.h:25:24: sparse: sparse: too many arguments for function __builtin_custom_ini
arch/nios2/include/asm/swab.h:25:24: sparse: sparse: too many arguments for function __builtin_custom_ini
arch/nios2/include/asm/swab.h:25:24: sparse: sparse: too many arguments for function __builtin_custom_ini
arch/nios2/include/asm/swab.h:25:24: sparse: sparse: too many arguments for function __builtin_custom_ini
arch/nios2/include/asm/swab.h:25:24: sparse: sparse: too many arguments for function __builtin_custom_ini
vim +312 net/ipv4/ipmr.c
301
302 bool ipmr_rule_default(const struct fib_rule *rule)
303 {
304 return fib_rule_matchall(rule) && rule->table == RT_TABLE_DEFAULT;
305 }
306 EXPORT_SYMBOL(ipmr_rule_default);
307 #else
308 static struct mr_table *ipmr_mr_table_iter(struct net *net,
309 struct mr_table *mrt)
310 {
311 if (!mrt)
> 312 return rcu_dereference(net->ipv4.mrt);
313 return NULL;
314 }
315
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki