)]}' { "commit": "055db6957e4735b16cd2fa94a5bbfb754c9b8023", "tree": "78db33199a5d1852a261f48dd0941b35a0028301", "parents": [ "b7e732fa3171318418524b776b841b4024933b2b" ], "author": { "name": "Jay Vosburgh", "email": "jay.vosburgh@canonical.com", "time": "Tue Nov 07 19:50:07 2017 +0900" }, "committer": { "name": "David S. Miller", "email": "davem@davemloft.net", "time": "Wed Nov 08 16:07:10 2017 +0900" }, "message": "bonding: fix slave stuck in BOND_LINK_FAIL state\n\nThe bonding miimon logic has a flaw, in that a failure of the\nrtnl_trylock can cause a slave to become permanently stuck in\nBOND_LINK_FAIL state.\n\n\tThe sequence of events to cause this is as follows:\n\n\t1) bond_miimon_inspect finds that a slave\u0027s link is down, and so\ncalls bond_propose_link_state, setting slave-\u003enew_link_state to\nBOND_LINK_FAIL, then sets slave-\u003enew_link to BOND_LINK_DOWN and returns\nnon-zero.\n\n\t2) In bond_mii_monitor, the rtnl_trylock fails, and the timer is\nrescheduled. No change is committed.\n\n\t3) bond_miimon_inspect is called again, but this time the slave\nfrom step 1 has recovered. slave-\u003enew_link is reset to NOCHANGE, and, as\nslave-\u003elink was never changed, the switch enters the BOND_LINK_UP case,\nand does nothing. The pending BOND_LINK_FAIL state from step 1 remains\npending, as new_link_state is not reset.\n\n\t4) The state from step 3 persists until another slave changes link\nstate and causes bond_miimon_inspect to return non-zero. At this point,\nthe BOND_LINK_FAIL state change on the slave from steps 1-3 is committed,\nand the slave will remain stuck in BOND_LINK_FAIL state even though it\nis actually link up.\n\n\tThe remedy for this is to initialize new_link_state on each entry\nto bond_miimon_inspect, as is already done with new_link.\n\nFixes: fb9eb899a6dc (\"bonding: handle link transition from FAIL to UP correctly\")\nReported-by: Alex Sidorenko \u003calexandre.sidorenko@hpe.com\u003e\nReviewed-by: Jarod Wilson \u003cjarod@redhat.com\u003e\nSigned-off-by: Jay Vosburgh \u003cjay.vosburgh@canonical.com\u003e\nAcked-by: Mahesh Bandewar \u003cmaheshb@google.com\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "76e8054bfc4eb371f03a5d1f18584c842bbb6d03", "old_mode": 33188, "old_path": "drivers/net/bonding/bond_main.c", "new_id": "b2db581131b2d49a843c1f548e7341a12e395127", "new_mode": 33188, "new_path": "drivers/net/bonding/bond_main.c" } ] }