diff options
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_alb.c | 4 | ||||
-rw-r--r-- | drivers/net/bonding/bond_main.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index e83bc825f6af..32923162179e 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c | |||
@@ -1433,7 +1433,7 @@ void bond_alb_monitor(struct bonding *bond) | |||
1433 | * write lock to protect from other code that also | 1433 | * write lock to protect from other code that also |
1434 | * sets the promiscuity. | 1434 | * sets the promiscuity. |
1435 | */ | 1435 | */ |
1436 | write_lock(&bond->curr_slave_lock); | 1436 | write_lock_bh(&bond->curr_slave_lock); |
1437 | 1437 | ||
1438 | if (bond_info->primary_is_promisc && | 1438 | if (bond_info->primary_is_promisc && |
1439 | (++bond_info->rlb_promisc_timeout_counter >= RLB_PROMISC_TIMEOUT)) { | 1439 | (++bond_info->rlb_promisc_timeout_counter >= RLB_PROMISC_TIMEOUT)) { |
@@ -1448,7 +1448,7 @@ void bond_alb_monitor(struct bonding *bond) | |||
1448 | bond_info->primary_is_promisc = 0; | 1448 | bond_info->primary_is_promisc = 0; |
1449 | } | 1449 | } |
1450 | 1450 | ||
1451 | write_unlock(&bond->curr_slave_lock); | 1451 | write_unlock_bh(&bond->curr_slave_lock); |
1452 | 1452 | ||
1453 | if (bond_info->rlb_rebalance) { | 1453 | if (bond_info->rlb_rebalance) { |
1454 | bond_info->rlb_rebalance = 0; | 1454 | bond_info->rlb_rebalance = 0; |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index c0bbddae4ec4..17a461152d39 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -4692,6 +4692,8 @@ static int bond_check_params(struct bond_params *params) | |||
4692 | return 0; | 4692 | return 0; |
4693 | } | 4693 | } |
4694 | 4694 | ||
4695 | static struct lock_class_key bonding_netdev_xmit_lock_key; | ||
4696 | |||
4695 | /* Create a new bond based on the specified name and bonding parameters. | 4697 | /* Create a new bond based on the specified name and bonding parameters. |
4696 | * Caller must NOT hold rtnl_lock; we need to release it here before we | 4698 | * Caller must NOT hold rtnl_lock; we need to release it here before we |
4697 | * set up our sysfs entries. | 4699 | * set up our sysfs entries. |
@@ -4727,6 +4729,9 @@ int bond_create(char *name, struct bond_params *params, struct bonding **newbond | |||
4727 | if (res < 0) { | 4729 | if (res < 0) { |
4728 | goto out_bond; | 4730 | goto out_bond; |
4729 | } | 4731 | } |
4732 | |||
4733 | lockdep_set_class(&bond_dev->_xmit_lock, &bonding_netdev_xmit_lock_key); | ||
4734 | |||
4730 | if (newbond) | 4735 | if (newbond) |
4731 | *newbond = bond_dev->priv; | 4736 | *newbond = bond_dev->priv; |
4732 | 4737 | ||