Skip to content

bonding: add port protection for bond_3ad_xxx_change()

Ding Tianhong netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3bonding: protect port for bond_3ad_adapter_speed_changed()drivers/net/bonding/bond_3ad.c+8 -30 replies
2/3bonding: protect port for bond_3ad_adapter_duplex_changed()drivers/net/bonding/bond_3ad.c+8 -30 replies
3/3bonding: protect port for bond_3ad_handle_link_change()drivers/net/bonding/bond_3ad.c+17 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net 0/3] 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