Skip to content

Fix lockdep issues with stacked devices

Vlad Yasevich netdev 3 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 6 repliesIn review
  2. v24 patches 2 repliesSuperseded
  3. v14 patches 0 repliesSuperseded

Changes in v3 from the cover letter

- Remove rcu variants from patch1, since that function is called only under rtnl.
- Fix whitespace problems reported by checkpatch

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4net: Find the nesting level of a given device by type.include/linux/netdevice.h net/core/dev.c+60 -01 reply
2/4net: Allow for more then a single subclass for netif_addr_lockinclude/linux/netdevice.h+7 -14 replies
3/4vlan: Fix lockdep warning with stacked vlan devices.include/linux/if_vlan.h net/8021q/vlan.c net/8021q/vlan_dev.c +1 more+12 -450 replies
4/4macvlan: Fix lockdep warnings with stacked macvlan devicesdrivers/net/macvlan.c include/linux/if_macvlan.h+11 -21 reply

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/4] Fix lockdep issues with stacked devices

Recent commit dc8eaaa006350d24030502a4521542e74b5cb39f
vlan: Fix lockdep warning when vlan dev handle notification

attempted to solve lockdep issues with vlans where multiple vlans were stacked. However, the code does not work correctly when the vlan stack is interspersed with other devices in between the vlans. Additionally, similar lockdep issues show up with other devices.

This series provides a generic way to solve these issue for any devices that can be stacked. It also addresses the concern for vlan and macvlan devices. I am not sure whether it makes sense to do so for other types like team, vxlan, and bond.

Thanks
-vlad

Since v2:
- Remove rcu variants from patch1, since that function is called only under rtnl.
- Fix whitespace problems reported by checkpatch

Since v1:
- Fixed up a goofed-up rebase.
* is_vlan_dev() should be bool and that change belongs in patch3.
* patch4 should not have any vlan changes in it.

Vlad Yasevich (4):
net: Find the nesting level of a given device by type.
net: Allow for more then a single subclass for netif_addr_lock
vlan: Fix lockdep warning with stacked vlan devices.
macvlan: Fix lockdep warnings with stacked macvlan devices

 drivers/net/macvlan.c      | 12 +++++++++--
 include/linux/if_macvlan.h |  1 +
 include/linux/if_vlan.h    |  3 ++-
 include/linux/netdevice.h  | 18 +++++++++++++++-
 net/8021q/vlan.c           |  1 +
 net/8021q/vlan_dev.c       | 52 ++++++++--------------------------------------
 net/core/dev.c             | 49 ++++++++++++++++++++++++++++++++++++++++++-
 7 files changed, 88 insertions(+), 48 deletions(-)
Signature · 1 line
1.9.0