Skip to content
  • Fabian Frederick's avatar
    net: fix rcu access on phonet_routes · 79952bca
    Fabian Frederick authored
    
    
    -Add __rcu annotation on table to fix sparse warnings:
    net/phonet/pn_dev.c:279:25: warning: incorrect type in assignment (different address spaces)
    net/phonet/pn_dev.c:279:25:    expected struct net_device *<noident>
    net/phonet/pn_dev.c:279:25:    got void [noderef] <asn:4>*<noident>
    net/phonet/pn_dev.c:376:17: warning: incorrect type in assignment (different address spaces)
    net/phonet/pn_dev.c:376:17:    expected struct net_device *volatile <noident>
    net/phonet/pn_dev.c:376:17:    got struct net_device [noderef] <asn:4>*<noident>
    net/phonet/pn_dev.c:392:17: warning: incorrect type in assignment (different address spaces)
    net/phonet/pn_dev.c:392:17:    expected struct net_device *<noident>
    net/phonet/pn_dev.c:392:17:    got void [noderef] <asn:4>*<noident>
    
    -Access table with rcu_access_pointer (fixes the following sparse errors):
    net/phonet/pn_dev.c:278:25: error: incompatible types in comparison expression (different address spaces)
    net/phonet/pn_dev.c:391:17: error: incompatible types in comparison expression (different address spaces)
    
    Suggested-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
    Acked-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    79952bca