aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2017-10-07 19:30:27 -0700
committerDavid S. Miller <davem@davemloft.net>2017-10-08 21:16:30 -0700
commitf59c031e9134bb16c38980196a73d7ba40979baa (patch)
tree48f92d5e737c9078a30a1e19fc2140a9c78dd599 /net/ipv6
parentipv6: ipv6_chk_prefix() rcu conversion (diff)
downloadlinux-dev-f59c031e9134bb16c38980196a73d7ba40979baa.tar.xz
linux-dev-f59c031e9134bb16c38980196a73d7ba40979baa.zip
ipv6: __ipv6_dev_get_saddr() rcu conversion
Callers hold rcu_read_lock(), so we do not need the rcu_read_lock()/rcu_read_unlock() pair. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/addrconf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index ea63442209bf..20c3ca777529 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1558,8 +1558,7 @@ static int __ipv6_dev_get_saddr(struct net *net,
{
struct ipv6_saddr_score *score = &scores[1 - hiscore_idx], *hiscore = &scores[hiscore_idx];
- read_lock_bh(&idev->lock);
- list_for_each_entry(score->ifa, &idev->addr_list, if_list) {
+ list_for_each_entry_rcu(score->ifa, &idev->addr_list, if_list) {
int i;
/*
@@ -1625,7 +1624,6 @@ static int __ipv6_dev_get_saddr(struct net *net,
}
}
out:
- read_unlock_bh(&idev->lock);
return hiscore_idx;
}