diff options
author | Jiri Pirko <jiri@resnulli.us> | 2013-06-10 17:42:25 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-12 03:06:16 -0700 |
commit | 735d381fa57c573935d35a24ea271ec99897ac63 (patch) | |
tree | e1118f79060396214ac150339eaa6a3a1c7c2168 /drivers/net/team/team_mode_loadbalance.c | |
parent | d80b35beac78b52faad2359adf6a6b14e2725e51 (diff) | |
download | blackbird-op-linux-735d381fa57c573935d35a24ea271ec99897ac63.tar.gz blackbird-op-linux-735d381fa57c573935d35a24ea271ec99897ac63.zip |
team: remove synchronize_rcu() called during port disable
Check the unlikely case of team->en_port_count == 0 before modulo
operation.
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/team/team_mode_loadbalance.c')
-rw-r--r-- | drivers/net/team/team_mode_loadbalance.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/team/team_mode_loadbalance.c b/drivers/net/team/team_mode_loadbalance.c index cdc31b5ea15e..829a9cd2b4da 100644 --- a/drivers/net/team/team_mode_loadbalance.c +++ b/drivers/net/team/team_mode_loadbalance.c @@ -112,9 +112,8 @@ static struct team_port *lb_hash_select_tx_port(struct team *team, struct sk_buff *skb, unsigned char hash) { - int port_index; + int port_index = team_num_to_port_index(team, hash); - port_index = hash % team->en_port_count; return team_get_port_by_index_rcu(team, port_index); } |