OSDN Git Service

Merge branch 'bonding-fixes'
authorDavid S. Miller <davem@davemloft.net>
Fri, 17 Mar 2023 07:56:41 +0000 (07:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Mar 2023 07:56:41 +0000 (07:56 +0000)
commitf5e305e63b035a1782a666a6535765f80bb2dca3
tree8cc7bae0c0a272d867825f0cd72b3ec0d93416db
parent53515a052adb469f47330dab3eabf701f8a7d3d9
parent222c94ec0ad48b951f0f692a7cf5bcf7a6bcb6b1
Merge branch 'bonding-fixes'

Nikolay Aleksandrov says:

====================
bonding: properly restore flags when bond changes ether type

A bug was reported by syzbot[1] that causes a warning and a myriad of
other potential issues if a bond, that is also a slave, fails to enslave a
non-eth device. While fixing that bug I found that we have the same
issues when such enslave passes and after that the bond changes back to
ARPHRD_ETHER (again due to ether_setup). This set fixes all issues by
extracting the ether_setup() sequence in a helper which does the right
thing about bond flags when it needs to change back to ARPHRD_ETHER. It
also adds selftests for these cases.

Patch 01 adds the new bond_ether_setup helper and fixes the issues when a
bond device changes its ether type due to successful enslave. Patch 02
fixes the issues when it changes its ether type due to an unsuccessful
enslave. Note we need two patches because the bugs were introduced by
different commits. Patch 03 adds the new selftests.

Due to the comment adjustment and squash, could you please review
patch 01 again? I've kept the other acks since there were no code
changes.

v3: squash the helper patch and the first fix, adjust the comment above
    it to be explicit about the bond device, no code changes
v2: new set, all patches are new due to new approach of fixing these bugs

[1] https://syzkaller.appspot.com/bug?id=391c7b1f6522182899efba27d891f1743e8eb3ef
====================

Signed-off-by: David S. Miller <davem@davemloft.net>