summaryrefslogtreecommitdiff
path: root/net/phonet/pn_netlink.c
diff options
context:
space:
mode:
authorRémi Denis-Courmont <remi.denis-courmont@nokia.com>2009-11-18 10:08:26 -0800
committerDavid S. Miller <davem@davemloft.net>2009-11-18 10:08:26 -0800
commiteeb74a9d45f781ec6f47b9e0a75a6a427b53f165 (patch)
treee996e55e190f6003e33b4fbe41600ff8528a100b /net/phonet/pn_netlink.c
parentd90310243fd750240755e217c5faa13e24f41536 (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.c6
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)
int addr_idx = 0, addr_start_idx = cb->args[1];
pndevs = phonet_device_list(sock_net(skb->sk));
- spin_lock_bh(&pndevs->lock);
- list_for_each_entry(pnd, &pndevs->list, list) {
+ rcu_read_lock();
+ list_for_each_entry_rcu(pnd, &pndevs->list, list) {
u8 addr;
if (dev_idx > dev_start_idx)
@@ -154,7 +154,7 @@ static int getaddr_dumpit(struct sk_buff *skb, struct netlink_callback *cb)
}
out:
- spin_unlock_bh(&pndevs->lock);
+ rcu_read_unlock();
cb->args[0] = dev_idx;
cb->args[1] = addr_idx;