diff options
author | Florian Westphal <fw@strlen.de> | 2019-05-31 18:27:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-03 03:08:36 +0200 |
commit | 2638eb8b50cfc16240e0bb080b9afbf541a9b39d (patch) | |
tree | 84264a6f50aaedfac6854bef3d5972926d321c10 /drivers/net/ethernet | |
parent | drivers: use in_dev_for_each_ifa_rtnl/rcu (diff) | |
download | linux-2638eb8b50cfc16240e0bb080b9afbf541a9b39d.tar.xz linux-2638eb8b50cfc16240e0bb080b9afbf541a9b39d.zip |
net: ipv4: provide __rcu annotation for ifa_list
ifa_list is protected by rcu, yet code doesn't reflect this.
Add the __rcu annotations and fix up all places that are now reported by
sparse.
I've done this in the same commit to not add intermediate patches that
result in new warnings.
Reported-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/via/via-velocity.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/via/via-velocity.h b/drivers/net/ethernet/via/via-velocity.h index c0ecc6c7b5e0..cdfe7809e3c1 100644 --- a/drivers/net/ethernet/via/via-velocity.h +++ b/drivers/net/ethernet/via/via-velocity.h @@ -1509,7 +1509,7 @@ static inline int velocity_get_ip(struct velocity_info *vptr) rcu_read_lock(); in_dev = __in_dev_get_rcu(vptr->netdev); if (in_dev != NULL) { - ifa = (struct in_ifaddr *) in_dev->ifa_list; + ifa = rcu_dereference(in_dev->ifa_list); if (ifa != NULL) { memcpy(vptr->ip_addr, &ifa->ifa_address, 4); res = 0; |