ipmr: Add __rcu to netns_ipv4.mrt.
Subsystems (2)
PATCH 1/1 ipmr: Add __rcu to netns_ipv4.mrt.
kernel test robot reported this Sparse warning:
$ make C=1 net/ipv4/ipmr.o net/ipv4/ipmr.c:312:24: error: incompatible types in comparison expression (different address spaces): net/ipv4/ipmr.c:312:24: struct mr_table [noderef] __rcu * net/ipv4/ipmr.c:312:24: struct mr_table *
Let's add __rcu annotation to netns_ipv4.mrt.
Fixes b3b6babf4751 ("ipmr: Free mr_table after RCU grace period.")
Reported-by kernel test robot <[email protected]>
Signed-off-by Kuniyuki Iwashima <[email protected]>
--- include/net/netns/ipv4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/net/netns/ipv4.h +1 -1
@@ -275,7 +275,7 @@ struct netns_ipv4 {#ifdef CONFIG_IP_MROUTE #ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES -struct mr_table *mrt; +struct mr_table __rcu *mrt;#else struct list_head mr_tables;struct fib_rules_ops *mr_rules_ops;
Signature · 1 line
2.54.0.545.g6539524ca2-goog
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Sat, 2 May 2026 18:07:47 +0000 you wrote:
kernel test robot reported this Sparse warning:
$ make C=1 net/ipv4/ipmr.o net/ipv4/ipmr.c:312:24: error: incompatible types in comparison expression (different address spaces): net/ipv4/ipmr.c:312:24: struct mr_table [noderef] __rcu * net/ipv4/ipmr.c:312:24: struct mr_table *[...]
Here is the summary with links:
- [v1,net] ipmr: Add __rcu to netns_ipv4.mrt.
https://git.kernel.org/netdev/net/c/a6039776c799
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html