]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'bridge-ioctl-fixes'
authorDavid S. Miller <davem@davemloft.net>
Thu, 5 Aug 2021 10:36:59 +0000 (11:36 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Aug 2021 10:36:59 +0000 (11:36 +0100)
commit292a864b4abcb2196b58a8156470e7580d0cb2d9
treecdc7a2fa03144725689da62cf4f7233690965c42
parentc33ec1bef3a66948a55e9c1fc6469cf250fbb05d
parent1b72e2f0266baa45157d7fbbc10288cf81a8f043
Merge branch 'bridge-ioctl-fixes'

Nikolay Aleksandrov says:

====================
net: bridge: fix recent ioctl changes

These are three fixes for the recent bridge removal of ndo_do_ioctl
done by commit dbd9edbf26a9 ("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).
====================

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