Re: net/ipv4/ipmr.c:312:24: sparse: sparse: incompatible types in comparison expression (different address spaces):

From: Kuniyuki Iwashima

Date: Sat May 02 2026 - 13:54:21 EST


On Sat, May 2, 2026 at 9:39 AM kernel test robot <lkp@xxxxxxxxx> wrote:
>
> 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 *

Will add __rcu to struct mr_table in netns_ipv4.

Thanks