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
@ -2125,9 +2125,11 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev)
|
||||
rcu_read_lock();
|
||||
in_dev = __in_dev_get_rcu(pkt_dev->odev);
|
||||
if (in_dev) {
|
||||
if (in_dev->ifa_list) {
|
||||
pkt_dev->saddr_min =
|
||||
in_dev->ifa_list->ifa_address;
|
||||
const struct in_ifaddr *ifa;
|
||||
|
||||
ifa = rcu_dereference(in_dev->ifa_list);
|
||||
if (ifa) {
|
||||
pkt_dev->saddr_min = ifa->ifa_address;
|
||||
pkt_dev->saddr_max = pkt_dev->saddr_min;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user