nfsd4: allow 4.0 clients to change callback path
[safe/jmp/linux-2.6] / net / phonet / pn_netlink.c
index 609e509..2e6c7eb 100644 (file)
@@ -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;