diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-20 16:43:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-20 16:43:21 -0400 |
commit | 06f4e926d256d902dd9a53dcb400fd74974ce087 (patch) | |
tree | 0b438b67f5f0eff6fd617bc497a9dace6164a488 /net/decnet | |
parent | 8e7bfcbab3825d1b404d615cb1b54f44ff81f981 (diff) | |
parent | d93515611bbc70c2fe4db232e5feb448ed8e4cc9 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1446 commits)
macvlan: fix panic if lowerdev in a bond
tg3: Add braces around 5906 workaround.
tg3: Fix NETIF_F_LOOPBACK error
macvlan: remove one synchronize_rcu() call
networking: NET_CLS_ROUTE4 depends on INET
irda: Fix error propagation in ircomm_lmp_connect_response()
irda: Kill set but unused variable 'bytes' in irlan_check_command_param()
irda: Kill set but unused variable 'clen' in ircomm_connect_indication()
rxrpc: Fix set but unused variable 'usage' in rxrpc_get_transport()
be2net: Kill set but unused variable 'req' in lancer_fw_download()
irda: Kill set but unused vars 'saddr' and 'daddr' in irlan_provider_connect_indication()
atl1c: atl1c_resume() is only used when CONFIG_PM_SLEEP is defined.
rxrpc: Fix set but unused variable 'usage' in rxrpc_get_peer().
rxrpc: Kill set but unused variable 'local' in rxrpc_UDP_error_handler()
rxrpc: Kill set but unused variable 'sp' in rxrpc_process_connection()
rxrpc: Kill set but unused variable 'sp' in rxrpc_rotate_tx_window()
pkt_sched: Kill set but unused variable 'protocol' in tc_classify()
isdn: capi: Use pr_debug() instead of ifdefs.
tg3: Update version to 3.119
tg3: Apply rx_discards fix to 5719/5720
...
Fix up trivial conflicts in arch/x86/Kconfig and net/mac80211/agg-tx.c
as per Davem.
Diffstat (limited to 'net/decnet')
-rw-r--r-- | net/decnet/dn_dev.c | 10 | ||||
-rw-r--r-- | net/decnet/dn_route.c | 15 | ||||
-rw-r--r-- | net/decnet/dn_table.c | 4 |
3 files changed, 12 insertions, 17 deletions
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index 4c27615340dc..cf26ac74a188 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c | |||
@@ -747,7 +747,8 @@ static int dn_nl_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) | |||
747 | skip_naddr = cb->args[1]; | 747 | skip_naddr = cb->args[1]; |
748 | 748 | ||
749 | idx = 0; | 749 | idx = 0; |
750 | for_each_netdev(&init_net, dev) { | 750 | rcu_read_lock(); |
751 | for_each_netdev_rcu(&init_net, dev) { | ||
751 | if (idx < skip_ndevs) | 752 | if (idx < skip_ndevs) |
752 | goto cont; | 753 | goto cont; |
753 | else if (idx > skip_ndevs) { | 754 | else if (idx > skip_ndevs) { |
@@ -756,11 +757,11 @@ static int dn_nl_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) | |||
756 | skip_naddr = 0; | 757 | skip_naddr = 0; |
757 | } | 758 | } |
758 | 759 | ||
759 | if ((dn_db = rtnl_dereference(dev->dn_ptr)) == NULL) | 760 | if ((dn_db = rcu_dereference(dev->dn_ptr)) == NULL) |
760 | goto cont; | 761 | goto cont; |
761 | 762 | ||
762 | for (ifa = rtnl_dereference(dn_db->ifa_list), dn_idx = 0; ifa; | 763 | for (ifa = rcu_dereference(dn_db->ifa_list), dn_idx = 0; ifa; |
763 | ifa = rtnl_dereference(ifa->ifa_next), dn_idx++) { | 764 | ifa = rcu_dereference(ifa->ifa_next), dn_idx++) { |
764 | if (dn_idx < skip_naddr) | 765 | if (dn_idx < skip_naddr) |
765 | continue; | 766 | continue; |
766 | 767 | ||
@@ -773,6 +774,7 @@ cont: | |||
773 | idx++; | 774 | idx++; |
774 | } | 775 | } |
775 | done: | 776 | done: |
777 | rcu_read_unlock(); | ||
776 | cb->args[0] = idx; | 778 | cb->args[0] = idx; |
777 | cb->args[1] = dn_idx; | 779 | cb->args[1] = dn_idx; |
778 | 780 | ||
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 9f09d4fc2880..74544bc6fdec 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -1125,13 +1125,11 @@ make_route: | |||
1125 | if (dev_out->flags & IFF_LOOPBACK) | 1125 | if (dev_out->flags & IFF_LOOPBACK) |
1126 | flags |= RTCF_LOCAL; | 1126 | flags |= RTCF_LOCAL; |
1127 | 1127 | ||
1128 | rt = dst_alloc(&dn_dst_ops, 0); | 1128 | rt = dst_alloc(&dn_dst_ops, dev_out, 1, 0, DST_HOST); |
1129 | if (rt == NULL) | 1129 | if (rt == NULL) |
1130 | goto e_nobufs; | 1130 | goto e_nobufs; |
1131 | 1131 | ||
1132 | atomic_set(&rt->dst.__refcnt, 1); | 1132 | memset(&rt->fld, 0, sizeof(rt->fld)); |
1133 | rt->dst.flags = DST_HOST; | ||
1134 | |||
1135 | rt->fld.saddr = oldflp->saddr; | 1133 | rt->fld.saddr = oldflp->saddr; |
1136 | rt->fld.daddr = oldflp->daddr; | 1134 | rt->fld.daddr = oldflp->daddr; |
1137 | rt->fld.flowidn_oif = oldflp->flowidn_oif; | 1135 | rt->fld.flowidn_oif = oldflp->flowidn_oif; |
@@ -1146,8 +1144,6 @@ make_route: | |||
1146 | rt->rt_dst_map = fld.daddr; | 1144 | rt->rt_dst_map = fld.daddr; |
1147 | rt->rt_src_map = fld.saddr; | 1145 | rt->rt_src_map = fld.saddr; |
1148 | 1146 | ||
1149 | rt->dst.dev = dev_out; | ||
1150 | dev_hold(dev_out); | ||
1151 | rt->dst.neighbour = neigh; | 1147 | rt->dst.neighbour = neigh; |
1152 | neigh = NULL; | 1148 | neigh = NULL; |
1153 | 1149 | ||
@@ -1399,10 +1395,11 @@ static int dn_route_input_slow(struct sk_buff *skb) | |||
1399 | } | 1395 | } |
1400 | 1396 | ||
1401 | make_route: | 1397 | make_route: |
1402 | rt = dst_alloc(&dn_dst_ops, 0); | 1398 | rt = dst_alloc(&dn_dst_ops, out_dev, 0, 0, DST_HOST); |
1403 | if (rt == NULL) | 1399 | if (rt == NULL) |
1404 | goto e_nobufs; | 1400 | goto e_nobufs; |
1405 | 1401 | ||
1402 | memset(&rt->fld, 0, sizeof(rt->fld)); | ||
1406 | rt->rt_saddr = fld.saddr; | 1403 | rt->rt_saddr = fld.saddr; |
1407 | rt->rt_daddr = fld.daddr; | 1404 | rt->rt_daddr = fld.daddr; |
1408 | rt->rt_gateway = fld.daddr; | 1405 | rt->rt_gateway = fld.daddr; |
@@ -1419,9 +1416,7 @@ make_route: | |||
1419 | rt->fld.flowidn_iif = in_dev->ifindex; | 1416 | rt->fld.flowidn_iif = in_dev->ifindex; |
1420 | rt->fld.flowidn_mark = fld.flowidn_mark; | 1417 | rt->fld.flowidn_mark = fld.flowidn_mark; |
1421 | 1418 | ||
1422 | rt->dst.flags = DST_HOST; | ||
1423 | rt->dst.neighbour = neigh; | 1419 | rt->dst.neighbour = neigh; |
1424 | rt->dst.dev = out_dev; | ||
1425 | rt->dst.lastuse = jiffies; | 1420 | rt->dst.lastuse = jiffies; |
1426 | rt->dst.output = dn_rt_bug; | 1421 | rt->dst.output = dn_rt_bug; |
1427 | switch(res.type) { | 1422 | switch(res.type) { |
@@ -1440,8 +1435,6 @@ make_route: | |||
1440 | rt->dst.input = dst_discard; | 1435 | rt->dst.input = dst_discard; |
1441 | } | 1436 | } |
1442 | rt->rt_flags = flags; | 1437 | rt->rt_flags = flags; |
1443 | if (rt->dst.dev) | ||
1444 | dev_hold(rt->dst.dev); | ||
1445 | 1438 | ||
1446 | err = dn_rt_set_next_hop(rt, &res); | 1439 | err = dn_rt_set_next_hop(rt, &res); |
1447 | if (err) | 1440 | if (err) |
diff --git a/net/decnet/dn_table.c b/net/decnet/dn_table.c index 99d8d3a40998..bd0a52dd1d40 100644 --- a/net/decnet/dn_table.c +++ b/net/decnet/dn_table.c | |||
@@ -123,11 +123,11 @@ static inline void dn_rebuild_zone(struct dn_zone *dz, | |||
123 | struct dn_fib_node **old_ht, | 123 | struct dn_fib_node **old_ht, |
124 | int old_divisor) | 124 | int old_divisor) |
125 | { | 125 | { |
126 | int i; | ||
127 | struct dn_fib_node *f, **fp, *next; | 126 | struct dn_fib_node *f, **fp, *next; |
127 | int i; | ||
128 | 128 | ||
129 | for(i = 0; i < old_divisor; i++) { | 129 | for(i = 0; i < old_divisor; i++) { |
130 | for(f = old_ht[i]; f; f = f->fn_next) { | 130 | for(f = old_ht[i]; f; f = next) { |
131 | next = f->fn_next; | 131 | next = f->fn_next; |
132 | for(fp = dn_chain_p(f->fn_key, dz); | 132 | for(fp = dn_chain_p(f->fn_key, dz); |
133 | *fp && dn_key_leq((*fp)->fn_key, f->fn_key); | 133 | *fp && dn_key_leq((*fp)->fn_key, f->fn_key); |