diff options
Diffstat (limited to 'net/netlabel/netlabel_unlabeled.c')
-rw-r--r-- | net/netlabel/netlabel_unlabeled.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c index 921c118ead89..cc105a10e3f8 100644 --- a/net/netlabel/netlabel_unlabeled.c +++ b/net/netlabel/netlabel_unlabeled.c | |||
@@ -381,12 +381,12 @@ static struct netlbl_unlhsh_addr6 *netlbl_unlhsh_search_addr6( | |||
381 | static struct netlbl_unlhsh_iface *netlbl_unlhsh_search_iface(int ifindex) | 381 | static struct netlbl_unlhsh_iface *netlbl_unlhsh_search_iface(int ifindex) |
382 | { | 382 | { |
383 | u32 bkt; | 383 | u32 bkt; |
384 | struct list_head *bkt_list; | ||
384 | struct netlbl_unlhsh_iface *iter; | 385 | struct netlbl_unlhsh_iface *iter; |
385 | 386 | ||
386 | bkt = netlbl_unlhsh_hash(ifindex); | 387 | bkt = netlbl_unlhsh_hash(ifindex); |
387 | list_for_each_entry_rcu(iter, | 388 | bkt_list = &rcu_dereference(netlbl_unlhsh)->tbl[bkt]; |
388 | &rcu_dereference(netlbl_unlhsh)->tbl[bkt], | 389 | list_for_each_entry_rcu(iter, bkt_list, list) |
389 | list) | ||
390 | if (iter->valid && iter->ifindex == ifindex) | 390 | if (iter->valid && iter->ifindex == ifindex) |
391 | return iter; | 391 | return iter; |
392 | 392 | ||
@@ -1427,6 +1427,7 @@ static int netlbl_unlabel_staticlist(struct sk_buff *skb, | |||
1427 | struct netlbl_unlhsh_iface *iface; | 1427 | struct netlbl_unlhsh_iface *iface; |
1428 | struct netlbl_unlhsh_addr4 *addr4; | 1428 | struct netlbl_unlhsh_addr4 *addr4; |
1429 | struct netlbl_unlhsh_addr6 *addr6; | 1429 | struct netlbl_unlhsh_addr6 *addr6; |
1430 | struct list_head *iter_list; | ||
1430 | 1431 | ||
1431 | cb_arg.nl_cb = cb; | 1432 | cb_arg.nl_cb = cb; |
1432 | cb_arg.skb = skb; | 1433 | cb_arg.skb = skb; |
@@ -1436,9 +1437,8 @@ static int netlbl_unlabel_staticlist(struct sk_buff *skb, | |||
1436 | for (iter_bkt = skip_bkt; | 1437 | for (iter_bkt = skip_bkt; |
1437 | iter_bkt < rcu_dereference(netlbl_unlhsh)->size; | 1438 | iter_bkt < rcu_dereference(netlbl_unlhsh)->size; |
1438 | iter_bkt++, iter_chain = 0, iter_addr4 = 0, iter_addr6 = 0) { | 1439 | iter_bkt++, iter_chain = 0, iter_addr4 = 0, iter_addr6 = 0) { |
1439 | list_for_each_entry_rcu(iface, | 1440 | iter_list = &rcu_dereference(netlbl_unlhsh)->tbl[iter_bkt]; |
1440 | &rcu_dereference(netlbl_unlhsh)->tbl[iter_bkt], | 1441 | list_for_each_entry_rcu(iface, iter_list, list) { |
1441 | list) { | ||
1442 | if (!iface->valid || | 1442 | if (!iface->valid || |
1443 | iter_chain++ < skip_chain) | 1443 | iter_chain++ < skip_chain) |
1444 | continue; | 1444 | continue; |