Skip to content

net: bridge: fix recent ioctl changes

Nikolay Aleksandrov bridge netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (refs/heads/master):

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3net: bridge: fix ioctl lockingnet/bridge/br_if.c net/bridge/br_ioctl.c net/core/dev_ioctl.c+31 -172 repliesApplied
2/3net: bridge: fix ioctl old_deviceless bridge argumentnet/bridge/br_ioctl.c+1 -10 repliesApplied
3/3net: core: don't call SIOCBRADD/DELIF for non-bridge devicesnet/core/dev_ioctl.c+2 -00 repliesApplied

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH net-next 0/3] net: bridge: fix recent ioctl changes

From: Nikolay Aleksandrov <[email protected]>

Hi,
These are three fixes for the recent bridge removal of ndo_do_ioctl done by commit ad2f99aedf8f ("net: bridge: move bridge ioctls out of .ndo_do_ioctl"). Patch 01 fixes a deadlock of the new bridge ioctl hook lock and rtnl by taking a netdev reference and always taking the bridge ioctl lock first then rtnl from within the bridge hook. Patch 02 fixes old_deviceless() bridge calls device name argument, and patch 03 checks in dev_ifsioc()'s SIOCBRADD/DELIF cases if the netdevice is actually a bridge before interpreting its private ptr as net_bridge.

Patch 01 was tested by running old bridge-utils commands with lockdep enabled. Patch 02 was tested again by using bridge-utils and using the respective ioctl calls on a "up" bridge device. Patch 03 was tested by using the addif ioctl on a non-bridge device (e.g. loopback).

Thanks,
Nik

Nikolay Aleksandrov (3):
net: bridge: fix ioctl locking
net: bridge: fix ioctl old_deviceless bridge argument
net: core: don't call SIOCBRADD/DELIF for non-bridge devices

 net/bridge/br_if.c    |  4 +---
 net/bridge/br_ioctl.c | 39 +++++++++++++++++++++++++--------------
 net/core/dev_ioctl.c  |  9 ++++++++-
 3 files changed, 34 insertions(+), 18 deletions(-)
Signature · 1 line
2.31.1