net/ipv6/ip6mr.c:295:24: sparse: sparse: incompatible types in comparison expression (different address spaces):
From: kernel test robot
Date: Tue Sep 22 2026 - 05:14:13 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f0100363d8c374bd8e9ea7c9ba02744f0b802ca4
commit: 2c309a863dd6e609b10caa55a362dc48d2e04564 ip6mr: Free mr_table after RCU grace period.
date: 4 months ago
config: powerpc64-randconfig-r1309-20260922 (https://download.01.org/0day-ci/archive/20260922/202609221639.e2GA34hZ-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260922/202609221639.e2GA34hZ-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: 2c309a863dd6 ("ip6mr: Free mr_table after RCU grace period.")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609221639.e2GA34hZ-lkp@xxxxxxxxx/
sparse warnings: (new ones prefixed by >>)
>> net/ipv6/ip6mr.c:295:24: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv6/ip6mr.c:295:24: sparse: struct mr_table [noderef] __rcu *
net/ipv6/ip6mr.c:295:24: sparse: struct mr_table *
net/ipv6/ip6mr.c:301:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv6/ip6mr.c:301:16: sparse: struct mr_table [noderef] __rcu *
net/ipv6/ip6mr.c:301:16: sparse: struct mr_table *
net/ipv6/ip6mr.c:301:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv6/ip6mr.c:301:16: sparse: struct mr_table [noderef] __rcu *
net/ipv6/ip6mr.c:301:16: sparse: struct mr_table *
net/ipv6/ip6mr.c:312:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv6/ip6mr.c:312:16: sparse: struct mr_table [noderef] __rcu *
net/ipv6/ip6mr.c:312:16: sparse: struct mr_table *
net/ipv6/ip6mr.c:326:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv6/ip6mr.c:326:9: sparse: struct mr_table [noderef] __rcu *
net/ipv6/ip6mr.c:326:9: sparse: struct mr_table *
net/ipv6/ip6mr.c:332:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv6/ip6mr.c:332:32: sparse: struct mr_table [noderef] __rcu *
net/ipv6/ip6mr.c:332:32: sparse: struct mr_table *
net/ipv6/ip6mr.c:336:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv6/ip6mr.c:336:9: sparse: struct mr_table [noderef] __rcu *
net/ipv6/ip6mr.c:336:9: sparse: struct mr_table *
vim +295 net/ipv6/ip6mr.c
283
284 bool ip6mr_rule_default(const struct fib_rule *rule)
285 {
286 return fib_rule_matchall(rule) && rule->action == FR_ACT_TO_TBL &&
287 rule->table == RT6_TABLE_DFLT && !rule->l3mdev;
288 }
289 EXPORT_SYMBOL(ip6mr_rule_default);
290 #else
291 static struct mr_table *ip6mr_mr_table_iter(struct net *net,
292 struct mr_table *mrt)
293 {
294 if (!mrt)
> 295 return rcu_dereference(net->ipv6.mrt6);
296 return NULL;
297 }
298
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki