aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@redhat.com>2014-09-11 16:49:22 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-13 16:29:06 -0400
commit86e749866d7c6b0ee1f9377cf7142f2690596a05 (patch)
treed81e5ce453b7c3f875f5110ddc315cf92612ccde /drivers/net/bonding
parentb25bd2515ea32cf5ddd5fd5a2a93b8c9dd875e4f (diff)
bonding: 3ad: clean up curr_slave_lock usage
Remove the read_lock in bond_3ad_lacpdu_recv() since when the slave is being released its rx_handler is removed before 3ad unbind, so even if packets arrive, they won't see the slave in an inconsistent state. Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_3ad.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 5d27a6207384..dfd3a7835d17 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2476,20 +2476,16 @@ err_free:
2476int bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond, 2476int bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond,
2477 struct slave *slave) 2477 struct slave *slave)
2478{ 2478{
2479 int ret = RX_HANDLER_ANOTHER;
2480 struct lacpdu *lacpdu, _lacpdu; 2479 struct lacpdu *lacpdu, _lacpdu;
2481 2480
2482 if (skb->protocol != PKT_TYPE_LACPDU) 2481 if (skb->protocol != PKT_TYPE_LACPDU)
2483 return ret; 2482 return RX_HANDLER_ANOTHER;
2484 2483
2485 lacpdu = skb_header_pointer(skb, 0, sizeof(_lacpdu), &_lacpdu); 2484 lacpdu = skb_header_pointer(skb, 0, sizeof(_lacpdu), &_lacpdu);
2486 if (!lacpdu) 2485 if (!lacpdu)
2487 return ret; 2486 return RX_HANDLER_ANOTHER;
2488 2487
2489 read_lock(&bond->curr_slave_lock); 2488 return bond_3ad_rx_indication(lacpdu, slave, skb->len);
2490 ret = bond_3ad_rx_indication(lacpdu, slave, skb->len);
2491 read_unlock(&bond->curr_slave_lock);
2492 return ret;
2493} 2489}
2494 2490
2495/** 2491/**