|
@@ -1182,17 +1182,13 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
|
|
|
int s_ip_idx, s_idx = cb->args[0];
|
|
|
|
|
|
s_ip_idx = ip_idx = cb->args[1];
|
|
|
- read_lock(&dev_base_lock);
|
|
|
for (dev = dev_base, idx = 0; dev; dev = dev->next, idx++) {
|
|
|
if (idx < s_idx)
|
|
|
continue;
|
|
|
if (idx > s_idx)
|
|
|
s_ip_idx = 0;
|
|
|
- rcu_read_lock();
|
|
|
- if ((in_dev = __in_dev_get_rcu(dev)) == NULL) {
|
|
|
- rcu_read_unlock();
|
|
|
+ if ((in_dev = __in_dev_get_rtnl(dev)) == NULL)
|
|
|
continue;
|
|
|
- }
|
|
|
|
|
|
for (ifa = in_dev->ifa_list, ip_idx = 0; ifa;
|
|
|
ifa = ifa->ifa_next, ip_idx++) {
|
|
@@ -1200,16 +1196,12 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
|
|
|
continue;
|
|
|
if (inet_fill_ifaddr(skb, ifa, NETLINK_CB(cb->skb).pid,
|
|
|
cb->nlh->nlmsg_seq,
|
|
|
- RTM_NEWADDR, NLM_F_MULTI) <= 0) {
|
|
|
- rcu_read_unlock();
|
|
|
+ RTM_NEWADDR, NLM_F_MULTI) <= 0)
|
|
|
goto done;
|
|
|
- }
|
|
|
}
|
|
|
- rcu_read_unlock();
|
|
|
}
|
|
|
|
|
|
done:
|
|
|
- read_unlock(&dev_base_lock);
|
|
|
cb->args[0] = idx;
|
|
|
cb->args[1] = ip_idx;
|
|
|
|