diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-09-15 00:04:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-16 01:06:05 -0400 |
commit | 95ae6b228f814fc0528d0506ee9f18ac333d6851 (patch) | |
tree | d5287f3dee478e1bd5fa79e63192447c5bc91e92 /drivers/net/wan | |
parent | 9e0064a5456fd75fd7c70f6f3692c7f732f91a65 (diff) |
ipv4: ip_ptr cleanups
dev->ip_ptr is protected by rtnl and rcu.
Yet some places dont use appropriate primitives and/or locking rules.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/hdlc_cisco.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c index b38ffa149aba..b1e5e5b69c2a 100644 --- a/drivers/net/wan/hdlc_cisco.c +++ b/drivers/net/wan/hdlc_cisco.c | |||
@@ -191,7 +191,8 @@ static int cisco_rx(struct sk_buff *skb) | |||
191 | 191 | ||
192 | switch (ntohl (cisco_data->type)) { | 192 | switch (ntohl (cisco_data->type)) { |
193 | case CISCO_ADDR_REQ: /* Stolen from syncppp.c :-) */ | 193 | case CISCO_ADDR_REQ: /* Stolen from syncppp.c :-) */ |
194 | in_dev = dev->ip_ptr; | 194 | rcu_read_lock(); |
195 | in_dev = __in_dev_get_rcu(dev); | ||
195 | addr = 0; | 196 | addr = 0; |
196 | mask = ~cpu_to_be32(0); /* is the mask correct? */ | 197 | mask = ~cpu_to_be32(0); /* is the mask correct? */ |
197 | 198 | ||
@@ -211,6 +212,7 @@ static int cisco_rx(struct sk_buff *skb) | |||
211 | cisco_keepalive_send(dev, CISCO_ADDR_REPLY, | 212 | cisco_keepalive_send(dev, CISCO_ADDR_REPLY, |
212 | addr, mask); | 213 | addr, mask); |
213 | } | 214 | } |
215 | rcu_read_unlock(); | ||
214 | dev_kfree_skb_any(skb); | 216 | dev_kfree_skb_any(skb); |
215 | return NET_RX_SUCCESS; | 217 | return NET_RX_SUCCESS; |
216 | 218 | ||