Skip to contentSkip to conversation

bonding: add port protection for bond_3ad_xxx_change()

PATCH In review Ding Tianhong 3 participants 3 messages Dec 13, 2013 – Dec 18, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover bonding: add port protection for bond_3ad_xxx_change()

Jay Vosburgh said that the bond_3ad_adapter_speed_changed and bond_3ad_adapter_duplex_changed is called with RTNL only, and the functions will modify the port's information with no further locking, they will not mutex against bond state machine and incoming LACPDU which do not hold RTNL, So I add port lock to protect the port information.

But they are not critical bugs, they exist since day one, and till now they have never been hit and reported, because change for speed and duplex is very rare, and will not occur critical problem.

The comments in the function is very old, cleanup the comments together.

Ding Tianhong (3):
bonding: protect port for bond_3ad_adapter_speed_changed()
bonding: protect port for bond_3ad_adapter_duplex_changed()
bonding: protect port for bond_3ad_handle_link_change()

 drivers/net/bonding/bond_3ad.c | 45 +++++++++++++++++++++++++++++++-----------
 1 file changed, 33 insertions(+), 12 deletions(-)
Signature · 1 line
1.8.0
#1 lore raw
Quoted 7 lines · Ding Tianhong

Jay Vosburgh said that the bond_3ad_adapter_speed_changed and bond_3ad_adapter_duplex_changed is called with RTNL only, and the functions will modify the port's information with no further locking, they will not mutex against bond state machine and incoming LACPDU which do not hold RTNL, So I add port lock to protect the port information.

Quoted 5 lines

But they are not critical bugs, they exist since day one, and till now they have never been hit and reported, because change for speed and duplex is very rare, and will not occur critical problem.

The comments in the function is very old, cleanup the comments together.

For entire series:

	-J
Quoted 10 lines

Ding Tianhong (3):
bonding: protect port for bond_3ad_adapter_speed_changed()
bonding: protect port for bond_3ad_adapter_duplex_changed()
bonding: protect port for bond_3ad_handle_link_change()

drivers/net/bonding/bond_3ad.c | 45 +++++++++++++++++++++++++++++++-----------

1 file changed, 33 insertions(+), 12 deletions(-)
Signature · 1 line
1.8.0

---
-Jay Vosburgh, IBM Linux Technology Center, [email protected]

maintainer
#2 lore raw

From: Jay Vosburgh <[email protected]>
Date: Fri, 13 Dec 2013 14:26:02 -0800

Quoted 13 lines
Quoted 11 lines · Ding Tianhong

Jay Vosburgh said that the bond_3ad_adapter_speed_changed and bond_3ad_adapter_duplex_changed is called with RTNL only, and the functions will modify the port's information with no further locking, they will not mutex against bond state machine and incoming LACPDU which do not hold RTNL, So I add port lock to protect the port information.

But they are not critical bugs, they exist since day one, and till now they have never been hit and reported, because change for speed and duplex is very rare, and will not occur critical problem.

Quoted 5 lines
Quoted 1 line

The comments in the function is very old, cleanup the comments together.

For entire series:

Series applied, thanks.