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>
This commit is contained in:

committed by
David S. Miller

parent
cb8f1478ce
commit
2638eb8b50
@@ -2194,13 +2194,13 @@ static int ath6kl_wow_suspend_vif(struct ath6kl_vif *vif,
|
||||
if (!in_dev)
|
||||
return 0;
|
||||
|
||||
ifa = in_dev->ifa_list;
|
||||
ifa = rtnl_dereference(in_dev->ifa_list);
|
||||
memset(&ips, 0, sizeof(ips));
|
||||
|
||||
/* Configure IP addr only if IP address count < MAX_IP_ADDRS */
|
||||
while (index < MAX_IP_ADDRS && ifa) {
|
||||
ips[index] = ifa->ifa_local;
|
||||
ifa = ifa->ifa_next;
|
||||
ifa = rtnl_dereference(ifa->ifa_next);
|
||||
index++;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user