diff options
-rw-r--r-- | drivers/net/bonding/bond_main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 3a10551d64cf..d5fe5d5f490f 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -4544,6 +4544,8 @@ unsigned int bond_get_num_tx_queues(void) | |||
4544 | int bond_create(struct net *net, const char *name) | 4544 | int bond_create(struct net *net, const char *name) |
4545 | { | 4545 | { |
4546 | struct net_device *bond_dev; | 4546 | struct net_device *bond_dev; |
4547 | struct bonding *bond; | ||
4548 | struct alb_bond_info *bond_info; | ||
4547 | int res; | 4549 | int res; |
4548 | 4550 | ||
4549 | rtnl_lock(); | 4551 | rtnl_lock(); |
@@ -4557,6 +4559,14 @@ int bond_create(struct net *net, const char *name) | |||
4557 | return -ENOMEM; | 4559 | return -ENOMEM; |
4558 | } | 4560 | } |
4559 | 4561 | ||
4562 | /* | ||
4563 | * Initialize rx_hashtbl_used_head to RLB_NULL_INDEX. | ||
4564 | * It is set to 0 by default which is wrong. | ||
4565 | */ | ||
4566 | bond = netdev_priv(bond_dev); | ||
4567 | bond_info = &(BOND_ALB_INFO(bond)); | ||
4568 | bond_info->rx_hashtbl_used_head = RLB_NULL_INDEX; | ||
4569 | |||
4560 | dev_net_set(bond_dev, net); | 4570 | dev_net_set(bond_dev, net); |
4561 | bond_dev->rtnl_link_ops = &bond_link_ops; | 4571 | bond_dev->rtnl_link_ops = &bond_link_ops; |
4562 | 4572 | ||