diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-09-15 04:04:31 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-15 22:06:05 -0700 |
commit | 95ae6b228f814fc0528d0506ee9f18ac333d6851 (patch) | |
tree | d5287f3dee478e1bd5fa79e63192447c5bc91e92 /drivers/net/wan | |
parent | 9e0064a5456fd75fd7c70f6f3692c7f732f91a65 (diff) | |
download | linux-3.10-95ae6b228f814fc0528d0506ee9f18ac333d6851.tar.gz linux-3.10-95ae6b228f814fc0528d0506ee9f18ac333d6851.tar.bz2 linux-3.10-95ae6b228f814fc0528d0506ee9f18ac333d6851.zip |
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 b38ffa149ab..b1e5e5b69c2 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) switch (ntohl (cisco_data->type)) { case CISCO_ADDR_REQ: /* Stolen from syncppp.c :-) */ - in_dev = dev->ip_ptr; + rcu_read_lock(); + in_dev = __in_dev_get_rcu(dev); addr = 0; mask = ~cpu_to_be32(0); /* is the mask correct? */ @@ -211,6 +212,7 @@ static int cisco_rx(struct sk_buff *skb) cisco_keepalive_send(dev, CISCO_ADDR_REPLY, addr, mask); } + rcu_read_unlock(); dev_kfree_skb_any(skb); return NET_RX_SUCCESS; |