summaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2017-10-23 19:17:50 -0400
committerDavid S. Miller <davem@davemloft.net>2017-10-24 04:54:19 -0400
commita5c1d98f8ccf4359575772b36ed51f5857dd7165 (patch)
tree5970819869dbbc82f7b5ff3e4dca3a2a513dc59a /net/ipv6/addrconf.c
parent24f226da96278bf3956dac6fa293ef95bc22a90c (diff)
ipv6: addrconf: do not block BH in /proc/net/if_inet6 handling
Table is really RCU protected, no need to block BH Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 6c1e7ffb62ff..9232e9537082 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4097,9 +4097,9 @@ struct if6_iter_state {
4097 4097
4098static struct inet6_ifaddr *if6_get_first(struct seq_file *seq, loff_t pos) 4098static struct inet6_ifaddr *if6_get_first(struct seq_file *seq, loff_t pos)
4099{ 4099{
4100 struct inet6_ifaddr *ifa = NULL;
4101 struct if6_iter_state *state = seq->private; 4100 struct if6_iter_state *state = seq->private;
4102 struct net *net = seq_file_net(seq); 4101 struct net *net = seq_file_net(seq);
4102 struct inet6_ifaddr *ifa = NULL;
4103 int p = 0; 4103 int p = 0;
4104 4104
4105 /* initial bucket if pos is 0 */ 4105 /* initial bucket if pos is 0 */
@@ -4109,7 +4109,7 @@ static struct inet6_ifaddr *if6_get_first(struct seq_file *seq, loff_t pos)
4109 } 4109 }
4110 4110
4111 for (; state->bucket < IN6_ADDR_HSIZE; ++state->bucket) { 4111 for (; state->bucket < IN6_ADDR_HSIZE; ++state->bucket) {
4112 hlist_for_each_entry_rcu_bh(ifa, &inet6_addr_lst[state->bucket], 4112 hlist_for_each_entry_rcu(ifa, &inet6_addr_lst[state->bucket],
4113 addr_lst) { 4113 addr_lst) {
4114 if (!net_eq(dev_net(ifa->idev->dev), net)) 4114 if (!net_eq(dev_net(ifa->idev->dev), net))
4115 continue; 4115 continue;
@@ -4135,7 +4135,7 @@ static struct inet6_ifaddr *if6_get_next(struct seq_file *seq,
4135 struct if6_iter_state *state = seq->private; 4135 struct if6_iter_state *state = seq->private;
4136 struct net *net = seq_file_net(seq); 4136 struct net *net = seq_file_net(seq);
4137 4137
4138 hlist_for_each_entry_continue_rcu_bh(ifa, addr_lst) { 4138 hlist_for_each_entry_continue_rcu(ifa, addr_lst) {
4139 if (!net_eq(dev_net(ifa->idev->dev), net)) 4139 if (!net_eq(dev_net(ifa->idev->dev), net))
4140 continue; 4140 continue;
4141 state->offset++; 4141 state->offset++;
@@ -4144,7 +4144,7 @@ static struct inet6_ifaddr *if6_get_next(struct seq_file *seq,
4144 4144
4145 while (++state->bucket < IN6_ADDR_HSIZE) { 4145 while (++state->bucket < IN6_ADDR_HSIZE) {
4146 state->offset = 0; 4146 state->offset = 0;
4147 hlist_for_each_entry_rcu_bh(ifa, 4147 hlist_for_each_entry_rcu(ifa,
4148 &inet6_addr_lst[state->bucket], addr_lst) { 4148 &inet6_addr_lst[state->bucket], addr_lst) {
4149 if (!net_eq(dev_net(ifa->idev->dev), net)) 4149 if (!net_eq(dev_net(ifa->idev->dev), net))
4150 continue; 4150 continue;
@@ -4157,9 +4157,9 @@ static struct inet6_ifaddr *if6_get_next(struct seq_file *seq,
4157} 4157}
4158 4158
4159static void *if6_seq_start(struct seq_file *seq, loff_t *pos) 4159static void *if6_seq_start(struct seq_file *seq, loff_t *pos)
4160 __acquires(rcu_bh) 4160 __acquires(rcu)
4161{ 4161{
4162 rcu_read_lock_bh(); 4162 rcu_read_lock();
4163 return if6_get_first(seq, *pos); 4163 return if6_get_first(seq, *pos);
4164} 4164}
4165 4165
@@ -4173,9 +4173,9 @@ static void *if6_seq_next(struct seq_file *seq, void *v, loff_t *pos)
4173} 4173}
4174 4174
4175static void if6_seq_stop(struct seq_file *seq, void *v) 4175static void if6_seq_stop(struct seq_file *seq, void *v)
4176 __releases(rcu_bh) 4176 __releases(rcu)
4177{ 4177{
4178 rcu_read_unlock_bh(); 4178 rcu_read_unlock();
4179} 4179}
4180 4180
4181static int if6_seq_show(struct seq_file *seq, void *v) 4181static int if6_seq_show(struct seq_file *seq, void *v)