ipv6: fix sparse warning on rt6i_node
authorWei Wang <weiwan@google.com>
Fri, 25 Aug 2017 22:03:10 +0000 (15:03 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 11 Nov 2017 13:34:35 +0000 (13:34 +0000)
commit58ca58151b6b7c80d1b5628c6068f3b9c02b15ab
tree59836c460a39c7478ed4c61c34191395101e3e8c
parenta0fd6e87599055abd81716c16fbc5c13df8528e8
ipv6: fix sparse warning on rt6i_node

commit 4e587ea71bf924f7dac621f1351653bd41e446cb upstream.

Commit c5cff8561d2d adds rcu grace period before freeing fib6_node. This
generates a new sparse warning on rt->rt6i_node related code:
  net/ipv6/route.c:1394:30: error: incompatible types in comparison
  expression (different address spaces)
  ./include/net/ip6_fib.h:187:14: error: incompatible types in comparison
  expression (different address spaces)

This commit adds "__rcu" tag for rt6i_node and makes sure corresponding
rcu API is used for it.
After this fix, sparse no longer generates the above warning.

Fixes: c5cff8561d2d ("ipv6: add rcu grace period before freeing fib6_node")
Signed-off-by: Wei Wang <weiwan@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2:
 - fib6_add_rt2node() has only one assignment to update
 - Drop changes in rt6_cache_allowed_for_pmtu()
 - Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
include/net/ip6_fib.h
net/ipv6/addrconf.c
net/ipv6/ip6_fib.c