aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/team
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-06-19 19:49:39 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-19 19:49:39 -0400
commitd98cae64e4a733ff377184d78aa0b1f2b54faede (patch)
treee973e3c93fe7e17741567ac3947f5197bc9d582d /drivers/net/team
parent646093a29f85630d8efe2aa38fa585d2c3ea2e46 (diff)
parent4067c666f2dccf56f5db5c182713e68c40d46013 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/wireless/ath/ath9k/Kconfig drivers/net/xen-netback/netback.c net/batman-adv/bat_iv_ogm.c net/wireless/nl80211.c The ath9k Kconfig conflict was a change of a Kconfig option name right next to the deletion of another option. The xen-netback conflict was overlapping changes involving the handling of the notify list in xen_netbk_rx_action(). Batman conflict resolution provided by Antonio Quartulli, basically keep everything in both conflict hunks. The nl80211 conflict is a little more involved. In 'net' we added a dynamic memory allocation to nl80211_dump_wiphy() to fix a race that Linus reported. Meanwhile in 'net-next' the handlers were converted to use pre and post doit handlers which use a flag to determine whether to hold the RTNL mutex around the operation. However, the dump handlers to not use this logic. Instead they have to explicitly do the locking. There were apparent bugs in the conversion of nl80211_dump_wiphy() in that we were not dropping the RTNL mutex in all the return paths, and it seems we very much should be doing so. So I fixed that whilst handling the overlapping changes. To simplify the initial returns, I take the RTNL mutex after we try to allocate 'tb'. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/team')
-rw-r--r--drivers/net/team/team.c2
-rw-r--r--drivers/net/team/team_mode_random.c2
-rw-r--r--drivers/net/team/team_mode_roundrobin.c2
3 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index e46fef38685b..bff7e0b0b4e7 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -1111,8 +1111,8 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
1111 } 1111 }
1112 1112
1113 port->index = -1; 1113 port->index = -1;
1114 team_port_enable(team, port);
1115 list_add_tail_rcu(&port->list, &team->port_list); 1114 list_add_tail_rcu(&port->list, &team->port_list);
1115 team_port_enable(team, port);
1116 __team_compute_features(team); 1116 __team_compute_features(team);
1117 __team_port_change_port_added(port, !!netif_carrier_ok(port_dev)); 1117 __team_port_change_port_added(port, !!netif_carrier_ok(port_dev));
1118 __team_options_change_check(team); 1118 __team_options_change_check(team);
diff --git a/drivers/net/team/team_mode_random.c b/drivers/net/team/team_mode_random.c
index 5ca14d463ba7..7f032e211343 100644
--- a/drivers/net/team/team_mode_random.c
+++ b/drivers/net/team/team_mode_random.c
@@ -28,6 +28,8 @@ static bool rnd_transmit(struct team *team, struct sk_buff *skb)
28 28
29 port_index = random_N(team->en_port_count); 29 port_index = random_N(team->en_port_count);
30 port = team_get_port_by_index_rcu(team, port_index); 30 port = team_get_port_by_index_rcu(team, port_index);
31 if (unlikely(!port))
32 goto drop;
31 port = team_get_first_port_txable_rcu(team, port); 33 port = team_get_first_port_txable_rcu(team, port);
32 if (unlikely(!port)) 34 if (unlikely(!port))
33 goto drop; 35 goto drop;
diff --git a/drivers/net/team/team_mode_roundrobin.c b/drivers/net/team/team_mode_roundrobin.c
index 90311c7375fb..53665850b59e 100644
--- a/drivers/net/team/team_mode_roundrobin.c
+++ b/drivers/net/team/team_mode_roundrobin.c
@@ -33,6 +33,8 @@ static bool rr_transmit(struct team *team, struct sk_buff *skb)
33 port_index = team_num_to_port_index(team, 33 port_index = team_num_to_port_index(team,
34 rr_priv(team)->sent_packets++); 34 rr_priv(team)->sent_packets++);
35 port = team_get_port_by_index_rcu(team, port_index); 35 port = team_get_port_by_index_rcu(team, port_index);
36 if (unlikely(!port))
37 goto drop;
36 port = team_get_first_port_txable_rcu(team, port); 38 port = team_get_first_port_txable_rcu(team, port);
37 if (unlikely(!port)) 39 if (unlikely(!port))
38 goto drop; 40 goto drop;