All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v2 0/4] bonding: properly restore flags when bond changes ether type
@ 2023-03-14 11:14 Nikolay Aleksandrov
  2023-03-14 11:14 ` [PATCH net v2 1/4] bonding: add bond_ether_setup helper Nikolay Aleksandrov
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Nikolay Aleksandrov @ 2023-03-14 11:14 UTC (permalink / raw)
  To: netdev
  Cc: monis, syoshida, j.vosburgh, andy, kuba, davem, pabeni, edumazet,
	syzbot+9dfc3f3348729cc82277, Nikolay Aleksandrov

Hi,
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 that is used in the
following patches to fix the bond dev flag issues. Patch 02 fixes the
issues when a bond device changes its ether type due to successful
enslave. Patch 03 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 04 adds the new selftests.

v2: new set, all patches are new due to new approach of fixing these bugs

Thanks,
 Nik

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

Nikolay Aleksandrov (4):
  bonding: add bond_ether_setup helper
  bonding: restore IFF_MASTER/SLAVE flags on bond enslave ether type
    change
  bonding: restore bond's IFF_SLAVE flag if a non-eth dev enslave fails
  selftests: bonding: add tests for ether type changes

 drivers/net/bonding/bond_main.c               | 22 +++--
 .../selftests/drivers/net/bonding/Makefile    |  3 +-
 .../net/bonding/bond-eth-type-change.sh       | 85 +++++++++++++++++++
 3 files changed, 102 insertions(+), 8 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/bonding/bond-eth-type-change.sh

-- 
2.39.2


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-03-15  8:21 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-14 11:14 [PATCH net v2 0/4] bonding: properly restore flags when bond changes ether type Nikolay Aleksandrov
2023-03-14 11:14 ` [PATCH net v2 1/4] bonding: add bond_ether_setup helper Nikolay Aleksandrov
2023-03-14 14:58   ` Michal Kubiak
2023-03-14 15:08     ` Nikolay Aleksandrov
2023-03-14 15:12       ` Nikolay Aleksandrov
2023-03-14 15:34   ` Jay Vosburgh
2023-03-14 15:37     ` Nikolay Aleksandrov
2023-03-15  7:55   ` Jakub Kicinski
2023-03-15  8:21     ` Nikolay Aleksandrov
2023-03-14 11:14 ` [PATCH net v2 2/4] bonding: restore IFF_MASTER/SLAVE flags on bond enslave ether type change Nikolay Aleksandrov
2023-03-14 15:09   ` Michal Kubiak
2023-03-14 15:13     ` Nikolay Aleksandrov
2023-03-14 11:14 ` [PATCH net v2 3/4] bonding: restore bond's IFF_SLAVE flag if a non-eth dev enslave fails Nikolay Aleksandrov
2023-03-14 15:07   ` Michal Kubiak
2023-03-14 11:14 ` [PATCH net v2 4/4] selftests: bonding: add tests for ether type changes Nikolay Aleksandrov
2023-03-14 15:04   ` Michal Kubiak
2023-03-14 15:15 ` [PATCH net v2 0/4] bonding: properly restore flags when bond changes ether type Jonathan Toppins
2023-03-14 16:20 ` Jay Vosburgh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.