diff options
author | Rémi Denis-Courmont <remi.denis-courmont@nokia.com> | 2009-11-18 13:08:26 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-18 13:08:26 -0500 |
commit | eeb74a9d45f781ec6f47b9e0a75a6a427b53f165 (patch) | |
tree | e996e55e190f6003e33b4fbe41600ff8528a100b /net/phonet/pn_netlink.c | |
parent | d90310243fd750240755e217c5faa13e24f41536 (diff) |
Phonet: convert devices list to RCU
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/phonet/pn_netlink.c')
-rw-r--r-- | net/phonet/pn_netlink.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/phonet/pn_netlink.c b/net/phonet/pn_netlink.c index 609e509b369b..2e6c7eb8e76a 100644 --- a/net/phonet/pn_netlink.c +++ b/net/phonet/pn_netlink.c | |||
@@ -131,8 +131,8 @@ static int getaddr_dumpit(struct sk_buff *skb, struct netlink_callback *cb) | |||
131 | int addr_idx = 0, addr_start_idx = cb->args[1]; | 131 | int addr_idx = 0, addr_start_idx = cb->args[1]; |
132 | 132 | ||
133 | pndevs = phonet_device_list(sock_net(skb->sk)); | 133 | pndevs = phonet_device_list(sock_net(skb->sk)); |
134 | spin_lock_bh(&pndevs->lock); | 134 | rcu_read_lock(); |
135 | list_for_each_entry(pnd, &pndevs->list, list) { | 135 | list_for_each_entry_rcu(pnd, &pndevs->list, list) { |
136 | u8 addr; | 136 | u8 addr; |
137 | 137 | ||
138 | if (dev_idx > dev_start_idx) | 138 | if (dev_idx > dev_start_idx) |
@@ -154,7 +154,7 @@ static int getaddr_dumpit(struct sk_buff *skb, struct netlink_callback *cb) | |||
154 | } | 154 | } |
155 | 155 | ||
156 | out: | 156 | out: |
157 | spin_unlock_bh(&pndevs->lock); | 157 | rcu_read_unlock(); |
158 | cb->args[0] = dev_idx; | 158 | cb->args[0] = dev_idx; |
159 | cb->args[1] = addr_idx; | 159 | cb->args[1] = addr_idx; |
160 | 160 | ||