diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2026-06-05 03:29:06 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-06-09 20:13:05 +0300 |
| commit | f16013fde46d38e1a79216976445e1cd79922a72 (patch) | |
| tree | 2b0c4390f716c89dbc268a1d6e9e385e6a36be70 | |
| parent | f9a3e05114b85d63452e7f9c172b53d6a1736fe0 (diff) | |
| download | linux-f16013fde46d38e1a79216976445e1cd79922a72.tar.xz | |
net: ethtool: optionally skip rtnl_lock in cable test handlers
Skip rtnl_lock in cable test handlers. This is really a noop since
no ops locked device supports these.
Reviewed-by: Eric Dumazet <edumazet@google.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20260605002912.3456868-7-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| -rw-r--r-- | net/ethtool/cabletest.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/net/ethtool/cabletest.c b/net/ethtool/cabletest.c index 8d375dac2a40..9c22d4c767c6 100644 --- a/net/ethtool/cabletest.c +++ b/net/ethtool/cabletest.c @@ -73,8 +73,7 @@ int ethnl_act_cable_test(struct sk_buff *skb, struct genl_info *info) dev = req_info.dev; - rtnl_lock(); - netdev_lock_ops(dev); + netdev_lock_ops_compat(dev); phydev = ethnl_req_get_phydev(&req_info, tb, ETHTOOL_A_CABLE_TEST_HEADER, info->extack); @@ -101,8 +100,7 @@ int ethnl_act_cable_test(struct sk_buff *skb, struct genl_info *info) ethnl_cable_test_started(phydev, ETHTOOL_MSG_CABLE_TEST_NTF); out_unlock: - netdev_unlock_ops(dev); - rtnl_unlock(); + netdev_unlock_ops_compat(dev); ethnl_parse_header_dev_put(&req_info); return ret; } @@ -342,8 +340,7 @@ int ethnl_act_cable_test_tdr(struct sk_buff *skb, struct genl_info *info) if (ret) goto out_dev_put; - rtnl_lock(); - netdev_lock_ops(dev); + netdev_lock_ops_compat(dev); phydev = ethnl_req_get_phydev(&req_info, tb, ETHTOOL_A_CABLE_TEST_TDR_HEADER, info->extack); @@ -371,8 +368,7 @@ int ethnl_act_cable_test_tdr(struct sk_buff *skb, struct genl_info *info) ETHTOOL_MSG_CABLE_TEST_TDR_NTF); out_unlock: - netdev_unlock_ops(dev); - rtnl_unlock(); + netdev_unlock_ops_compat(dev); out_dev_put: ethnl_parse_header_dev_put(&req_info); return ret; |
