kernel-ark/net/ethtool
Jakub Kicinski 1af0a0948e ethtool: don't drop the rtnl_lock half way thru the ioctl
devlink compat code needs to drop rtnl_lock to take
devlink->lock to ensure correct lock ordering.

This is problematic because we're not strictly guaranteed
that the netdev will not disappear after we re-lock.
It may open a possibility of nested ->begin / ->complete
calls.

Instead of calling into devlink under rtnl_lock take
a ref on the devlink instance and make the call after
we've dropped rtnl_lock.

We (continue to) assume that netdevs have an implicit
reference on the devlink returned from ndo_get_devlink_port

Note that ndo_get_devlink_port will now get called
under rtnl_lock. That should be fine since none of
the drivers seem to be taking serious locks inside
ndo_get_devlink_port.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-01 13:26:07 +00:00
..
bitset.c
bitset.h
cabletest.c
channels.c
coalesce.c ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
common.c net: sock: extend SO_TIMESTAMPING for PHC binding 2021-07-01 13:08:18 -07:00
common.h
debug.c
eee.c
eeprom.c ethtool: Validate module EEPROM offset as part of policy 2021-06-22 10:40:54 -07:00
features.c
fec.c
ioctl.c ethtool: don't drop the rtnl_lock half way thru the ioctl 2021-11-01 13:26:07 +00:00
linkinfo.c
linkmodes.c
linkstate.c
Makefile ethtool: Add ability to control transceiver modules' power mode 2021-10-06 17:47:49 -07:00
module.c ethtool: Add ability to control transceiver modules' power mode 2021-10-06 17:47:49 -07:00
netlink.c ethtool: Add ability to control transceiver modules' power mode 2021-10-06 17:47:49 -07:00
netlink.h ethtool: Add ability to control transceiver modules' power mode 2021-10-06 17:47:49 -07:00
pause.c
phc_vclocks.c ethtool: add a new command for getting PHC virtual clocks 2021-07-01 13:08:18 -07:00
privflags.c
rings.c
stats.c
strset.c ethtool: strset: fix message length calculation 2021-06-14 12:14:24 -07:00
tsinfo.c
tunnels.c
wol.c