diff options
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 43f2ea541088..de3d351ccb6b 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -777,6 +777,9 @@ static void bond_resend_igmp_join_requests(struct bonding *bond) | |||
777 | 777 | ||
778 | read_lock(&bond->lock); | 778 | read_lock(&bond->lock); |
779 | 779 | ||
780 | if (bond->kill_timers) | ||
781 | goto out; | ||
782 | |||
780 | /* rejoin all groups on bond device */ | 783 | /* rejoin all groups on bond device */ |
781 | __bond_resend_igmp_join_requests(bond->dev); | 784 | __bond_resend_igmp_join_requests(bond->dev); |
782 | 785 | ||
@@ -790,9 +793,9 @@ static void bond_resend_igmp_join_requests(struct bonding *bond) | |||
790 | __bond_resend_igmp_join_requests(vlan_dev); | 793 | __bond_resend_igmp_join_requests(vlan_dev); |
791 | } | 794 | } |
792 | 795 | ||
793 | if (--bond->igmp_retrans > 0) | 796 | if ((--bond->igmp_retrans > 0) && !bond->kill_timers) |
794 | queue_delayed_work(bond->wq, &bond->mcast_work, HZ/5); | 797 | queue_delayed_work(bond->wq, &bond->mcast_work, HZ/5); |
795 | 798 | out: | |
796 | read_unlock(&bond->lock); | 799 | read_unlock(&bond->lock); |
797 | } | 800 | } |
798 | 801 | ||
@@ -1432,6 +1435,8 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb) | |||
1432 | struct sk_buff *skb = *pskb; | 1435 | struct sk_buff *skb = *pskb; |
1433 | struct slave *slave; | 1436 | struct slave *slave; |
1434 | struct bonding *bond; | 1437 | struct bonding *bond; |
1438 | void (*recv_probe)(struct sk_buff *, struct bonding *, | ||
1439 | struct slave *); | ||
1435 | 1440 | ||
1436 | skb = skb_share_check(skb, GFP_ATOMIC); | 1441 | skb = skb_share_check(skb, GFP_ATOMIC); |
1437 | if (unlikely(!skb)) | 1442 | if (unlikely(!skb)) |
@@ -1445,11 +1450,12 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb) | |||
1445 | if (bond->params.arp_interval) | 1450 | if (bond->params.arp_interval) |
1446 | slave->dev->last_rx = jiffies; | 1451 | slave->dev->last_rx = jiffies; |
1447 | 1452 | ||
1448 | if (bond->recv_probe) { | 1453 | recv_probe = ACCESS_ONCE(bond->recv_probe); |
1454 | if (recv_probe) { | ||
1449 | struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC); | 1455 | struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC); |
1450 | 1456 | ||
1451 | if (likely(nskb)) { | 1457 | if (likely(nskb)) { |
1452 | bond->recv_probe(nskb, bond, slave); | 1458 | recv_probe(nskb, bond, slave); |
1453 | dev_kfree_skb(nskb); | 1459 | dev_kfree_skb(nskb); |
1454 | } | 1460 | } |
1455 | } | 1461 | } |
@@ -2538,7 +2544,7 @@ void bond_mii_monitor(struct work_struct *work) | |||
2538 | } | 2544 | } |
2539 | 2545 | ||
2540 | re_arm: | 2546 | re_arm: |
2541 | if (bond->params.miimon) | 2547 | if (bond->params.miimon && !bond->kill_timers) |
2542 | queue_delayed_work(bond->wq, &bond->mii_work, | 2548 | queue_delayed_work(bond->wq, &bond->mii_work, |
2543 | msecs_to_jiffies(bond->params.miimon)); | 2549 | msecs_to_jiffies(bond->params.miimon)); |
2544 | out: | 2550 | out: |
@@ -2886,7 +2892,7 @@ void bond_loadbalance_arp_mon(struct work_struct *work) | |||
2886 | } | 2892 | } |
2887 | 2893 | ||
2888 | re_arm: | 2894 | re_arm: |
2889 | if (bond->params.arp_interval) | 2895 | if (bond->params.arp_interval && !bond->kill_timers) |
2890 | queue_delayed_work(bond->wq, &bond->arp_work, delta_in_ticks); | 2896 | queue_delayed_work(bond->wq, &bond->arp_work, delta_in_ticks); |
2891 | out: | 2897 | out: |
2892 | read_unlock(&bond->lock); | 2898 | read_unlock(&bond->lock); |
@@ -3154,7 +3160,7 @@ void bond_activebackup_arp_mon(struct work_struct *work) | |||
3154 | bond_ab_arp_probe(bond); | 3160 | bond_ab_arp_probe(bond); |
3155 | 3161 | ||
3156 | re_arm: | 3162 | re_arm: |
3157 | if (bond->params.arp_interval) | 3163 | if (bond->params.arp_interval && !bond->kill_timers) |
3158 | queue_delayed_work(bond->wq, &bond->arp_work, delta_in_ticks); | 3164 | queue_delayed_work(bond->wq, &bond->arp_work, delta_in_ticks); |
3159 | out: | 3165 | out: |
3160 | read_unlock(&bond->lock); | 3166 | read_unlock(&bond->lock); |